textureSize() - Error Fragment Shader

Full working example: Edit fiddle - JSFiddle - Code Playground

If you increase the second argument of textureSize(), you will see that the plane becomes darker since the resolution of the mipmaps get smaller.

You can also use this version but then you have to create a custom WebGL 2 rendering context and pass it to the renderer.

1 Like