In WebGL 2, you can look up the size of any texture within ESSL shaders using textureSize. With WebGL 1, you'd need to create a uniform and pass the data into the shader manually.
For example:
vec2 size = textureSize(sampler, lod);
In WebGL 2, you can look up the size of any texture within ESSL shaders using textureSize. With WebGL 1, you'd need to create a uniform and pass the data into the shader manually.
For example:
vec2 size = textureSize(sampler, lod);
3.145.186.6