My shader works fine on one sprite. For example:
…this works. But when I do
…nothing happens. Why?
Also, for some reason when I set the pipeline for my this.background (a sprite), it shrinks my sprite. I pass in the resolution of my scene to my shader
this.filter.setFloat2(‘uResolution’, this.width, this.height);
And this is my shader code where I use uResolution
vec2 st = gl_FragCoord.xy/uResolution.xy;
I also tried:
vec2 st = vec2(uResolution.x, uResolution.y);
The WebGL seems to be doing really weird things with the resolution and/or aspect ratio.