https://www.shadertoy.com/view/XffGW4
void mainImage( out vec4 O, vec2 U )
{
vec2 V = mod(U, 100.);
O = vec4( V.x == 0.5);
// O = vec4( V.x == 0.6);
}
change 0.5 to 0.6 the vertical line disapears, why?
V.x range from -0.5 to 0.5 or 0 to 100?
I have try change the 0.5 but did not work.
U
(which is actuallyfragCoord
(gl_FragCoord)) is the current fragment position center, so it's.5
for the left most pixel,1.5
for the fragment next to it etc. so the range ofV.x
will be.5 - 99.5
in increments of1.
.