-
Notifications
You must be signed in to change notification settings - Fork 28
/
gamma2.glsl
executable file
·149 lines (82 loc) · 2.32 KB
/
gamma2.glsl
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// GLSL shader autogenerated by cg2glsl.py.
#if defined(VERTEX)
vec4 _oPosition1;
uniform mat4 MVPMatrix;
vec4 _r0005;
attribute vec4 VertexCoord;
attribute vec4 TexCoord;
varying vec4 TEX0;
mat4 transpose_(mat4 matrix)
{
mat4 ret;
for (int i = 0; i != 4; i++)
for (int j = 0; j != 4; j++)
ret[i][j] = matrix[j][i];
return ret;
}
uniform int FrameDirection;
uniform int FrameCount;
#ifdef GL_ES
uniform mediump vec2 OutputSize;
uniform mediump vec2 TextureSize;
uniform mediump vec2 InputSize;
#else
uniform vec2 OutputSize;
uniform vec2 TextureSize;
uniform vec2 InputSize;
#endif
void main()
{
mat4 MVPMatrix_ = transpose_(MVPMatrix);
vec2 _oTex;
_r0005.x = dot(MVPMatrix_[0], VertexCoord);
_r0005.y = dot(MVPMatrix_[1], VertexCoord);
_r0005.z = dot(MVPMatrix_[2], VertexCoord);
_r0005.w = dot(MVPMatrix_[3], VertexCoord);
_oPosition1 = _r0005;
_oTex = TexCoord.xy;
gl_Position = _r0005;
TEX0.xy = TexCoord.xy;
}
#elif defined(FRAGMENT)
#ifdef GL_ES
precision mediump float;
#endif
vec4 _ret_0;
vec3 _TMP7;
float _TMP6;
float _TMP5;
float _TMP4;
float _TMP3;
vec4 _TMP0;
uniform sampler2D Texture;
vec3 _TMP31;
varying vec4 TEX0;
uniform int FrameDirection;
uniform int FrameCount;
#ifdef GL_ES
uniform mediump vec2 OutputSize;
uniform mediump vec2 TextureSize;
uniform mediump vec2 InputSize;
#else
uniform vec2 OutputSize;
uniform vec2 TextureSize;
uniform vec2 InputSize;
#endif
void main()
{
vec3 _res;
_TMP0 = texture2D(Texture, TEX0.xy);
_TMP3 = dot(_TMP0.xyz, vec3( 3.33299994E-001, 3.33299994E-001, 3.33299994E-001));
_res = vec3(_TMP3, _TMP3, _TMP3) + (_TMP0.xyz - vec3(_TMP3, _TMP3, _TMP3));
_TMP4 = pow(_res.x, 1.50000000E+000);
_TMP5 = pow(_res.y, 1.50000000E+000);
_TMP6 = pow(_res.z, 1.50000000E+000);
_res = vec3(_TMP4, _TMP5, _TMP6);
_TMP7 = min(vec3( 1.00000000E+000, 1.00000000E+000, 1.00000000E+000), _res);
_TMP31 = max(vec3( 0.00000000E+000, 0.00000000E+000, 0.00000000E+000), _TMP7);
_ret_0 = vec4(_TMP31.x, _TMP31.y, _TMP31.z, 1.00000000E+000);
gl_FragColor = _ret_0;
return;
}
#endif