diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-02-02 08:23:02 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-02-02 08:23:02 +0100 |
commit | df096b4b4e15ac150fd582baa0521eacdf8d86e8 (patch) | |
tree | d739a80296958a8879b39c6847d8cbf4498a5867 /examples/checkers.frag | |
parent | d28929a69b80f2efa0d0c957761ce81cf0e50f51 (diff) | |
download | glslview-df096b4b4e15ac150fd582baa0521eacdf8d86e8.tar glslview-df096b4b4e15ac150fd582baa0521eacdf8d86e8.zip |
examples: fix indentation
Diffstat (limited to 'examples/checkers.frag')
-rw-r--r-- | examples/checkers.frag | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/examples/checkers.frag b/examples/checkers.frag index c9b56ff..a561842 100644 --- a/examples/checkers.frag +++ b/examples/checkers.frag @@ -11,29 +11,29 @@ 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) + ); } 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 repeat = 8.0; - float time_mod = mod(time / 200, repeat); - float w = 20 * pow(2, time_mod); + float repeat = 8.0; + float time_mod = mod(time / 200, repeat); + float w = 20 * pow(2, time_mod); - float f = time_mod / repeat; - vec2 pr = p * rot(f * PI/2); + float f = time_mod / repeat; + vec2 pr = p * rot(f * PI/2); - float tp = mod(floor(log2(abs(pr.x/w)) + floor(log2(abs(pr.y/w)))), 2); + float tp = mod(floor(log2(abs(pr.x/w)) + floor(log2(abs(pr.y/w)))), 2); - float darken = min(min(abs(pr.x), abs(pr.y)) / 0.01, 1.0); + float darken = min(min(abs(pr.x), abs(pr.y)) / 0.01, 1.0); - float scene = tp * darken; + float scene = tp * darken; - fragColor = vec4(vec3(1, 1, 1) * scene, 1); + fragColor = vec4(vec3(1, 1, 1) * scene, 1); } |