We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I was porting this very basic shader from Shadertoy when I ran into a weird problem.
Here is what the effect looks like on Shadertoy:
And here is what I get in Processing
The compression makes it harder to see the artifacts but it is these colored line in between the pixels. I remember seeing a similar problem in the PShader tutorial actually.
Is this a known bug? Is there a rounding error somewhere?
I only made minimal changes to the Shadertoy code:
uniform sampler2D texture; uniform vec2 sketchSize; void main(void) { vec2 uv = gl_FragCoord.xy / sketchSize.xy; vec2 divs = vec2(sketchSize.x * 20.0 / sketchSize.y, 20.0); uv = floor(uv * divs)/ divs; gl_FragColor = texture2D(texture, uv); }