72 lines
1.6 KiB
Plaintext
72 lines
1.6 KiB
Plaintext
|
|
#line 14
|
|
struct v2f {
|
|
mediump vec4 pos;
|
|
mediump vec4 color;
|
|
};
|
|
#line 9
|
|
struct appdata {
|
|
highp vec4 vertex;
|
|
highp vec3 normal;
|
|
};
|
|
uniform highp mat4 UNITY_MATRIX_MVP;
|
|
uniform highp vec4 unity_LightAtten[4];
|
|
uniform highp vec4 unity_LightColor[4];
|
|
v2f xlat_main( in appdata v );
|
|
#line 35
|
|
v2f xlat_main( in appdata v ) {
|
|
v2f o;
|
|
highp int i = 0;
|
|
highp int i_1 = 0;
|
|
highp int j = 3;
|
|
highp int i_2 = 0;
|
|
highp vec4 l;
|
|
highp int i_3 = 0;
|
|
highp vec4 l_1;
|
|
highp int k = 1;
|
|
highp int z;
|
|
#line 38
|
|
o.pos = (UNITY_MATRIX_MVP * v.vertex);
|
|
o.color = vec4( 0.00000);
|
|
for ( ; (i < 2); (++i)) {
|
|
o.color += unity_LightColor[i];
|
|
}
|
|
#line 45
|
|
for ( ; (i_1 < 4); (++i_1)) {
|
|
o.color += unity_LightColor[i_1];
|
|
}
|
|
#line 49
|
|
for ( ; (j >= 0); j = (j - 1)) {
|
|
o.color += unity_LightColor[j];
|
|
}
|
|
#line 53
|
|
for ( ; (i_2 < 2); (++i_2)) {
|
|
l = (unity_LightColor[i_2] * unity_LightAtten[i_2].x);
|
|
o.color += l;
|
|
}
|
|
#line 59
|
|
for ( ; (i_3 < 2); (++i_3)) {
|
|
l_1 = (unity_LightColor[i_3] * unity_LightAtten[i_3].z);
|
|
o.color += l_1;
|
|
}
|
|
#line 65
|
|
while ( (k < 3) ) {
|
|
o.color += unity_LightColor[k].x;
|
|
#line 69
|
|
z = (k + 1);
|
|
k = z;
|
|
}
|
|
#line 73
|
|
return o;
|
|
}
|
|
varying mediump vec4 xlv_TEXCOORD0;
|
|
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.color);
|
|
}
|