2022-01-02 19:28:16 -05:00
|
|
|
/* vim: set ft=c: */
|
|
|
|
|
|
|
|
/* <https://www.shadertoy.com/new> */
|
|
|
|
|
2022-01-13 12:15:07 -05:00
|
|
|
void
|
|
|
|
mainImage (out vec4 fragColor, in vec2 fragCoord)
|
|
|
|
{
|
|
|
|
// Normalized pixel coordinates (from 0 to 1)
|
|
|
|
// vec2 uv = fragCoord.xy / iResolution.xy;
|
2022-01-02 19:28:16 -05:00
|
|
|
|
2022-01-13 12:15:07 -05:00
|
|
|
// Texture coordinates
|
|
|
|
vec2 uv = TexCoords;
|
2022-01-02 19:28:16 -05:00
|
|
|
|
2022-01-13 12:15:07 -05:00
|
|
|
// float du = 1.0 / iResolution.y;
|
|
|
|
// vec2 uv = du * (fragCoord.xy - (0.5 * iResolution.xy));
|
|
|
|
|
|
|
|
// Time varying pixel color
|
|
|
|
vec3 col = 0.5 + 0.5 * cos (iTime + uv.xyx + vec3 (0, 2, 4));
|
|
|
|
|
|
|
|
// Output to screen
|
|
|
|
fragColor = vec4 (col, 1.0);
|
2022-01-02 19:28:16 -05:00
|
|
|
}
|