/
z-prepasslight-out.txt
54 lines (52 loc) · 1.28 KB
/
z-prepasslight-out.txt
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
#line 17
struct v2f {
vec4 pos;
vec4 uv;
vec3 ray;
};
#line 11
struct appdata {
vec4 vertex;
vec3 normal;
};
#line 1
uniform mat4 glstate_matrix_mvp;
uniform mat4 glstate_matrix_modelview0;
uniform vec4 _ProjectionParams;
#line 24
vec4 ComputeScreenPos( in vec4 pos );
v2f xlat_main( in appdata v );
#line 4
vec4 ComputeScreenPos( in vec4 pos ) {
#line 6
vec4 o = (pos * 0.5);
o.xy = (vec2( o.x, (o.y * _ProjectionParams.x)) + o.w);
o.zw = pos.zw;
return o;
}
#line 24
v2f xlat_main( in appdata v ) {
v2f o;
o.pos = (glstate_matrix_mvp * v.vertex);
#line 28
o.uv = ComputeScreenPos( o.pos);
o.ray = ((glstate_matrix_modelview0 * v.vertex).xyz * vec3( -1.0, -1.0, 1.0));
o.ray = mix( o.ray, v.normal, vec3( float((v.normal.z != 0.0))));
return o;
}
varying vec4 xlv_TEXCOORD0;
varying vec3 xlv_TEXCOORD1;
void main() {
v2f xl_retval;
appdata xlt_v;
xlt_v.vertex = vec4(gl_Vertex);
xlt_v.normal = vec3(gl_Normal);
xl_retval = xlat_main( xlt_v);
gl_Position = vec4(xl_retval.pos);
xlv_TEXCOORD0 = vec4(xl_retval.uv);
xlv_TEXCOORD1 = vec3(xl_retval.ray);
}
// uniforms:
// _ProjectionParams:<none> type 12 arrsize 0
// glstate_matrix_modelview0:<none> type 21 arrsize 0
// glstate_matrix_mvp:<none> type 21 arrsize 0