diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/symmetry.frag | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/symmetry.frag b/examples/symmetry.frag index f1a72ad..0e237cc 100644 --- a/examples/symmetry.frag +++ b/examples/symmetry.frag @@ -5,6 +5,7 @@ out vec4 fragColor; uniform vec2 res; uniform float time; +uniform int param_k; uniform int param_l; uniform int param_m; @@ -34,10 +35,10 @@ void main(void) { float scene = 0; - int n = param_l + 32; - float k = param_m; + int n = param_k + 32; + float k = param_l; for (int i = 0; i < n; i++) { - float c = square(vec2(0.5, 0) * rot(PI/2*(4.0*i/n)) * vec2(1, 1), 0.3, -PI/2*(k*i/n + time/1500), p); + float c = square(vec2(0.5, 0) * rot(PI/2*(4.0*i/n)) * vec2(1, 1), 0.3 + 0.02 * param_m, -PI/2*(k*i/n + time/1500), p * (1 + 0.03*param_m)); scene = abs(scene - c); } |