aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/plasma.frag.glsl
blob: 248288a6abc123f8991ba7bc7be90a4f7e73398b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// Fragment shader for procedural bricks
//
// Authors: Dave Baldwin, Steve Koren, Randi Rost
//          based on a shader by Darwyn Peachey
//
// Copyright (c) 2002-2006 3Dlabs Inc. Ltd. 
//
// See 3Dlabs-License.txt for license information
//

#ifdef GL_ES
precision highp float;
#endif


varying vec2 	v_uv;
uniform float 	u_time;
uniform vec4	color;

void main(void)
{
	float x = v_uv.x ;
	float y = v_uv.y ;
	float time = u_time;
	float wave =	(cos(time + y / 0.2  + cos(x / 0.3 + cos((y / 0.1)))));
	float wave1 =	(sin(abs(wave + y/0.6)));
	float wave2 =	(sin(abs(wave1 + y/0.8)));
	gl_FragColor = vec4( abs(vec3(wave2,wave1,wave)),1.0);
}