4
uniform mat4 ViewProjectionMatrix;
6
attribute vec4 AVertex;
7
attribute vec4 TextureCoord0;
8
attribute vec4 VertexColor;
10
varying vec4 varyTexCoord0;
11
varying vec4 varyVertexColor;
15
varyTexCoord0 = TextureCoord0;
16
varyVertexColor = VertexColor;
17
gl_Position = ViewProjectionMatrix * (AVertex);
22
#extension GL_ARB_texture_rectangle : enable
24
varying vec4 varyTexCoord0;
25
varying vec4 varyVertexColor;
28
uniform sampler2D TextureObject0;
29
uniform vec2 TextureSize0;
30
vec4 SampleTexture(sampler2D TexObject, vec2 TexCoord)
32
return texture2D(TexObject, TexCoord.st);
34
#elif defined SABrightnessMPLERTEX2DRECT
35
uniform sampler2DRect TextureObject0;
36
uniform vec2 TextureSize0;
37
vec4 SampleTexture(sampler2DRect TexObject, vec2 TexCoord)
39
return texture2DRect(TexObject, TexCoord.st);
43
#ifdef COLOR_MATRIX_FILTER
53
vec4 c = SampleTexture(TextureObject0, varyTexCoord0.st);
54
float r = CM0[0]* c.r + CM0[1]* c.g + CM0[2]* c.b + CM0[3]* c.a + CM0[4];
55
float g = CM1[0]* c.r + CM1[1]* c.g + CM1[2]* c.b + CM1[3]* c.a + CM1[4];
56
float b = CM2[0]* c.r + CM2[1]* c.g + CM2[2]* c.b + CM2[3]* c.a + CM2[4];
57
float a = CM3[0]* c.r + CM3[1]* c.g + CM3[2]* c.b + CM3[3]* c.a + CM3[4];
59
gl_FragColor = vec4(r, g, b, c.a);
b'\\ No newline at end of file'