From df096b4b4e15ac150fd582baa0521eacdf8d86e8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 2 Feb 2016 08:23:02 +0100 Subject: examples: fix indentation --- examples/symmetry.frag | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'examples/symmetry.frag') diff --git a/examples/symmetry.frag b/examples/symmetry.frag index 0fb9cd1..7a3fb18 100644 --- a/examples/symmetry.frag +++ b/examples/symmetry.frag @@ -11,31 +11,31 @@ const float PI = 3.14159265358979323846; mat2 rot(float a) { - return mat2( - cos(a), -sin(a), - sin(a), cos(a) - ); + return mat2( + cos(a), -sin(a), + sin(a), cos(a) + ); } float square(vec2 m, float a, float r, vec2 p) { - vec2 diff = abs((m - p) * rot(r)); - float d = max(diff.x, diff.y); + vec2 diff = abs((m - p) * rot(r)); + float d = max(diff.x, diff.y); - return clamp((a - d)*sharpness, 0.0, 1.0); + return clamp((a - d)*sharpness, 0.0, 1.0); } void main(void) { - vec2 m = res/2; - float s = min(m.x, m.y); - vec2 p = (gl_FragCoord.xy - m) / s; + vec2 m = res/2; + float s = min(m.x, m.y); + vec2 p = (gl_FragCoord.xy - m) / s; - float scene = 0; + float scene = 0; - int n = 24; - 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*(24.0*i/n - time/800), p); - scene = abs(scene - c); - } + int n = 24; + 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*(24.0*i/n - time/800), p); + scene = abs(scene - c); + } - fragColor = vec4(vec3(1, 1, 1) * scene, 1); + fragColor = vec4(vec3(1, 1, 1) * scene, 1); } -- cgit v1.2.3