Skip to content

Commit 49d2eaf

Browse files
committed
Third shader. Cool patterns.
1 parent 9b69f62 commit 49d2eaf

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

frag/003.glsl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
precision mediump float;
2+
3+
uniform vec2 iResolution;
4+
uniform float iTime;
5+
uniform vec2 iMouse;
6+
7+
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
8+
vec2 uv = fragCoord / iResolution.xy;
9+
10+
vec3 c1 = vec3(0., 0.4, 0.8);
11+
vec3 c2 = vec3(0.5, 0.1, 0.3);
12+
13+
fragColor = vec4(mix(c1, c2, sin(uv.xxx*iTime*uv.x)/cos(uv.yyy*iTime)), 1.0);
14+
}
15+
16+
void main() {
17+
mainImage(gl_FragColor, gl_FragCoord.xy);
18+
}

frag/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[
22
"001GianlucaFirstShader.glsl",
33
"002GianlucaExperiment.glsl",
4+
"003.glsl",
45
"testShader.glsl"
56
]

0 commit comments

Comments
 (0)