Is there a way to get textureSize?

Return to “ZGameEditor Visualizer Script Reference”

[You can only see part of this thread as you are not logged in to the forums]
revisualizer
Thu Jun 06, 2024 2:36 am

x

Is there a way to get textureSize?

Is there a way to get the texture size from within shader code?

Using textureSize() calls in shader code in ZGE results in blank textures. It seems it's just not implemented. Same with iChannelResolution[], which is understandable given it's assuming an array of textures. But textureSize() seems feasible if it could be implemented or is implemented somehow.

EDIT: A bit of background. I'm working on a dither effect implemented as a shader. It can use ZGE's Img Src texture as a dither pattern but I need to get the texture's size, otherwise the user would need to specify a size, which is inconvenient since the user won't easily know the size or be able to set it appropriately.

In case it helps, the working shader is unlisted on shadertoy:
https://www.shadertoy.com/view/43VGR1

Return to “ZGameEditor Visualizer Script Reference”