1#ifndef OUTFITS_H
2#define OUTFITS_H
3
4static const std::string glslAdvancedOutfitVertexShader = "\n\
5 attribute vec2 a_TexCoord;\n\
6 attribute vec2 a_Vertex;\n\
7 uniform mat3 u_TextureMatrix;\n\
8 varying vec2 v_TexCoord;\n\
9 varying vec2 v_TexCoord2;\n\
10 varying vec2 v_TexCoord3;\n\
11 uniform mat3 u_TransformMatrix;\n\
12 uniform mat3 u_ProjectionMatrix;\n\
13 uniform vec2 u_Offset;\n\
14 uniform vec2 u_Resolution;\n\
15 uniform float u_Depth;\n\
16 void main()\n\
17 {\n\
18 gl_Position = vec4((u_ProjectionMatrix * u_TransformMatrix * vec3(a_Vertex.xy, 1.0)).xy, u_Depth / 16384.0, 1.0);\n\
19 v_TexCoord = (u_TextureMatrix * vec3(a_TexCoord,1.0)).xy;\n\
20 v_TexCoord2 = (u_TextureMatrix * vec3(a_TexCoord + u_Offset,1.0)).xy;\n\
21 v_TexCoord3 = (u_TextureMatrix * vec3(u_Resolution,1.0)).xy;\n\
22 }\n";
23
24static const std::string glslAdvancedOutfitFragmentShader = "\n\
25 uniform float u_Depth;\n\
26 uniform mat4 u_Color;\n\
27 varying vec2 v_TexCoord;\n\
28 varying vec2 v_TexCoord2;\n\
29 uniform sampler2D u_Tex0;\n\
30 uniform sampler2D u_Tex1;\n\
31 void main()\n\
32 {\n\
33 gl_FragColor = texture2D(u_Tex0, v_TexCoord);\n\
34 if(texture2D(u_Tex0, v_TexCoord2).a > 0.01)\n\
35 gl_FragColor *= vec4(1.0, 1.0, 0.0, 1.0);\n\
36 if(gl_FragColor.a < 0.01) discard;\n\
37 }\n";
38
39#endif