Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement