From fdb86173bc35422315859e37ed27f9ad63fa7aec Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 3 Feb 2016 10:13:49 +0100 Subject: Add support for modifiable parameters --- examples/symmetry.frag | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/symmetry.frag b/examples/symmetry.frag index faebd75..f1a72ad 100644 --- a/examples/symmetry.frag +++ b/examples/symmetry.frag @@ -5,6 +5,9 @@ out vec4 fragColor; uniform vec2 res; uniform float time; +uniform int param_l; +uniform int param_m; + const float sharpness = 300; const float PI = 3.14159265358979323846; @@ -31,8 +34,8 @@ void main(void) { float scene = 0; - int n = 32; - float k = 0; + int n = param_l + 32; + float k = param_m; 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); scene = abs(scene - c); -- cgit v1.2.3