Web GL is based on GLES, not Open GL, so I don’t believe you have access to textureSize as you linked. If you know the texture size ahead of time. If you’re using the GPU Compute Renderer extension, I believe it has the variable,
resolution.xy
Built in for this, but otherwise, you’ll have to pass that in yourself as a uniform probably.
BTW, what is your ultimate goal that you’re trying to achieve. Perhaps you don’t need the texture size.
@Mugen87 I am using version 117. Do I need to switch to 118?
I have followed the webgl2 tutorial you have shared. And I have also checked that textureSize() is available in WebGL2 but I am still getting the error.