blob: e32eb19c86e944175a5fbdb0cb49ff2fa9455bb3 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
[require]
GLSL >= 1.10
[vertex shader]
#define VERTEX_SHADER
// Warsow GLSL shader
#if !defined(__GLSL_CG_DATA_TYPES)
#define myhalf float
#define myhalf2 vec2
#define myhalf3 vec3
#define myhalf4 vec4
#else
#define myhalf half
#define myhalf2 half2
#define myhalf3 half3
#define myhalf4 half4
#endif
#define M_TWOPI 6.28318530717958647692
varying vec2 TexCoord;
#ifdef VERTEX_SHADER
// Vertex shader
uniform float TurbAmplitude, TurbPhase;
void main(void)
{
gl_FrontColor = gl_Color;
vec4 turb;
turb = vec4(gl_MultiTexCoord0);
turb.s += TurbAmplitude * sin( ((gl_MultiTexCoord0.t / 4.0 + TurbPhase)) * M_TWOPI );
turb.t += TurbAmplitude * sin( ((gl_MultiTexCoord0.s / 4.0 + TurbPhase)) * M_TWOPI );
TexCoord = vec2(gl_TextureMatrix[0] * turb);
gl_Position = ftransform();
#ifdef APPLY_CLIPPING
#ifdef __GLSL_CG_DATA_TYPES
gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;
#endif
#endif
}
#endif // VERTEX_SHADER
#ifdef FRAGMENT_SHADER
// Fragment shader
uniform sampler2D BaseTexture;
void main(void)
{
|