aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/plasma.frag.glsl
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-22 11:52:31 -0800
committerNivesh Rajbhandari2012-02-22 11:52:31 -0800
commitd5b216d9d6d2b8cb93106e8f8ca351089d05b41d (patch)
tree657274b7efd3a930e4d3298ad6c245b975a8224b /assets/shaders/plasma.frag.glsl
parentdae612ccef06a18eb7cccc2fd9d0db13ec4ef5f9 (diff)
downloadninja-d5b216d9d6d2b8cb93106e8f8ca351089d05b41d.tar.gz
Integrating canvas-2d and WebGL drawing fixes. Also adding back WebGL materials.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'assets/shaders/plasma.frag.glsl')
-rw-r--r--assets/shaders/plasma.frag.glsl32
1 files changed, 32 insertions, 0 deletions
diff --git a/assets/shaders/plasma.frag.glsl b/assets/shaders/plasma.frag.glsl
new file mode 100644
index 00000000..2ab8f49c
--- /dev/null
+++ b/assets/shaders/plasma.frag.glsl
@@ -0,0 +1,32 @@
1//
2// Fragment shader for procedural bricks
3//
4// Authors: Dave Baldwin, Steve Koren, Randi Rost
5// based on a shader by Darwyn Peachey
6//
7// Copyright (c) 2002-2006 3Dlabs Inc. Ltd.
8//
9// See 3Dlabs-License.txt for license information
10//
11
12#ifdef GL_ES
13precision highp float;
14#endif
15
16
17varying vec2 v_uv;
18uniform float u_time;
19uniform vec4 color;
20
21void main(void)
22{
23 float x = v_uv.x ;
24 float y = v_uv.y ;
25 float time = color.x;
26 float wave = (cos(time + y / 0.2 + cos(x / 0.3 + cos((y / 0.1)))));
27 float wave1 = (sin(abs(wave + y/0.6)));
28 float wave2 = (sin(abs(wave1 + y/0.8)));
29 float tmp = u_time * 0.1;
30 gl_FragColor = vec4( abs(vec3(wave2,wave1,wave)),1.0);
31 //gl_FragColor = color;
32}