-
Notifications
You must be signed in to change notification settings - Fork 28
/
lcd3x.glsl
executable file
·232 lines (125 loc) · 3.31 KB
/
lcd3x.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// GLSL shader autogenerated by cg2glsl.py.
#if defined(VERTEX)
#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying
#define COMPAT_ATTRIBUTE attribute
#define COMPAT_TEXTURE texture2D
#endif
#ifdef GL_ES
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING float _frame_rotation;
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
float _frame_count;
float _frame_direction;
float _frame_rotation;
};
vec4 _oPosition1;
input_dummy _IN1;
vec4 _r0009;
COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 COLOR;
COMPAT_VARYING vec4 COL0;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX2;
uniform mat4 MVPMatrix;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
vec4 _oColor;
vec2 _oTex;
vec2 _omega;
_r0009 = VertexCoord.x*MVPMatrix[0];
_r0009 = _r0009 + VertexCoord.y*MVPMatrix[1];
_r0009 = _r0009 + VertexCoord.z*MVPMatrix[2];
_r0009 = _r0009 + VertexCoord.w*MVPMatrix[3];
_oPosition1 = _r0009;
_oColor = COLOR;
_oTex = TexCoord.xy;
_omega = 6.28318548E+000*TextureSize;
gl_Position = _r0009;
COL0 = COLOR;
TEX0.xy = TexCoord.xy;
TEX2.xy = _omega;
}
#elif defined(FRAGMENT)
#if __VERSION__ >= 130
#define COMPAT_VARYING in
#define COMPAT_TEXTURE texture
out vec4 FragColor;
#else
#define COMPAT_VARYING varying
#define FragColor gl_FragColor
#define COMPAT_TEXTURE texture2D
#endif
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING float _frame_rotation;
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
float _frame_count;
float _frame_direction;
float _frame_rotation;
};
vec4 _ret_0;
vec3 _TMP2;
float _TMP5;
float _TMP4;
float _TMP3;
float _TMP1;
vec4 _TMP0;
uniform sampler2D Texture;
vec3 _x0015;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX0;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
vec2 _angle;
float _yfactor;
vec3 _xfactors;
vec3 _color;
_TMP0 = COMPAT_TEXTURE(Texture, TEX0.xy);
_angle = TEX0.xy*TEX2.xy;
_TMP1 = sin(_angle.y);
_yfactor = (6.00000000E+000 + _TMP1)/7.00000000E+000;
_x0015 = _angle.x + vec3( 0.00000000E+000, 0.00000000E+000, -3.14159274E+000);
_TMP3 = sin(_x0015.x);
_TMP4 = sin(_x0015.y);
_TMP5 = sin(_x0015.z);
_TMP2 = vec3(_TMP3, _TMP4, _TMP5);
_xfactors = (2.40000000E+001 + _TMP2)/2.50000000E+001;
_color = (_yfactor*_xfactors)*_TMP0.xyz;
_ret_0 = vec4(_color.x, _color.y, _color.z, 1.00000000E+000);
FragColor = _ret_0;
return;
}
#endif