void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
float lambda = fragCoord.x/iResolution.x * 4.0;
float t = fragCoord.y/iResolution.y;
for (int i = 0; i < 1000; i++) {
t = lambda * t * (1.0 - t);
}
float col = 0.0;
float lb = fragCoord.y/iResolution.y;
float ub = (fragCoord.y + 1.0)/iResolution.y;
for (int i = 0; i < 256; i++) {
t = lambda * t * (1.0 - t);
if (lb < t && t < ub) {
col += 1.0 / 256.0;
}
}
col = sqrt(col);
col = sqrt(col);
// Output to screen
fragColor = vec4(col,col,col,1.0);
}
Comments
0 B
|👍
/👎
0 B
|👍
/👎