mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
164 lines
3.5 KiB
Text
164 lines
3.5 KiB
Text
struct v2f {
|
|
mediump vec4 pos;
|
|
mediump vec4 color;
|
|
};
|
|
struct appdata {
|
|
highp vec4 vertex;
|
|
highp vec3 normal;
|
|
};
|
|
varying mediump vec4 xlv_TEXCOORD0;
|
|
uniform highp vec4 unity_LightColor[4];
|
|
uniform highp vec4 unity_LightAtten[4];
|
|
uniform highp mat4 UNITY_MATRIX_MVP;
|
|
attribute lowp vec4 _glesColor;
|
|
attribute highp vec4 _glesMultiTexCoord1;
|
|
attribute highp vec4 _glesMultiTexCoord0;
|
|
attribute mediump vec3 _glesNormal;
|
|
attribute highp vec4 _glesVertex;
|
|
v2f xlat_main (
|
|
in appdata v_1
|
|
)
|
|
{
|
|
int z_2;
|
|
int k_3;
|
|
highp vec4 l_1_4;
|
|
int i_3_5;
|
|
highp vec4 l_6;
|
|
int i_2_7;
|
|
int j_8;
|
|
int i_1_9;
|
|
int i_10;
|
|
v2f o_11;
|
|
int tmpvar_12;
|
|
tmpvar_12 = 0;
|
|
i_10 = tmpvar_12;
|
|
int tmpvar_13;
|
|
tmpvar_13 = 0;
|
|
i_1_9 = tmpvar_13;
|
|
int tmpvar_14;
|
|
tmpvar_14 = 3;
|
|
j_8 = tmpvar_14;
|
|
int tmpvar_15;
|
|
tmpvar_15 = 0;
|
|
i_2_7 = tmpvar_15;
|
|
int tmpvar_16;
|
|
tmpvar_16 = 0;
|
|
i_3_5 = tmpvar_16;
|
|
int tmpvar_17;
|
|
tmpvar_17 = 1;
|
|
k_3 = tmpvar_17;
|
|
highp vec4 tmpvar_18;
|
|
tmpvar_18 = (UNITY_MATRIX_MVP * v_1.vertex);
|
|
o_11.pos = tmpvar_18;
|
|
vec4 tmpvar_19;
|
|
tmpvar_19 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
o_11.color = tmpvar_19;
|
|
while (true) {
|
|
if (!((i_10 < 2))) {
|
|
break;
|
|
};
|
|
highp vec4 tmpvar_20;
|
|
tmpvar_20 = (o_11.color + unity_LightColor[i_10]);
|
|
o_11.color = tmpvar_20;
|
|
int tmpvar_21;
|
|
tmpvar_21 = (i_10 + 1);
|
|
i_10 = tmpvar_21;
|
|
};
|
|
while (true) {
|
|
if (!((i_1_9 < 4))) {
|
|
break;
|
|
};
|
|
highp vec4 tmpvar_22;
|
|
tmpvar_22 = (o_11.color + unity_LightColor[i_1_9]);
|
|
o_11.color = tmpvar_22;
|
|
int tmpvar_23;
|
|
tmpvar_23 = (i_1_9 + 1);
|
|
i_1_9 = tmpvar_23;
|
|
};
|
|
while (true) {
|
|
if (!((j_8 >= 0))) {
|
|
break;
|
|
};
|
|
highp vec4 tmpvar_24;
|
|
tmpvar_24 = (o_11.color + unity_LightColor[j_8]);
|
|
o_11.color = tmpvar_24;
|
|
int tmpvar_25;
|
|
tmpvar_25 = (j_8 - 1);
|
|
j_8 = tmpvar_25;
|
|
};
|
|
while (true) {
|
|
if (!((i_2_7 < 2))) {
|
|
break;
|
|
};
|
|
highp vec4 tmpvar_26;
|
|
tmpvar_26 = (unity_LightColor[i_2_7] * unity_LightAtten[i_2_7].x);
|
|
l_6 = tmpvar_26;
|
|
highp vec4 tmpvar_27;
|
|
tmpvar_27 = (o_11.color + l_6);
|
|
o_11.color = tmpvar_27;
|
|
int tmpvar_28;
|
|
tmpvar_28 = (i_2_7 + 1);
|
|
i_2_7 = tmpvar_28;
|
|
};
|
|
while (true) {
|
|
if (!((i_3_5 < 2))) {
|
|
break;
|
|
};
|
|
highp vec4 tmpvar_29;
|
|
tmpvar_29 = (unity_LightColor[i_3_5] * unity_LightAtten[i_3_5].z);
|
|
l_1_4 = tmpvar_29;
|
|
highp vec4 tmpvar_30;
|
|
tmpvar_30 = (o_11.color + l_1_4);
|
|
o_11.color = tmpvar_30;
|
|
int tmpvar_31;
|
|
tmpvar_31 = (i_3_5 + 1);
|
|
i_3_5 = tmpvar_31;
|
|
};
|
|
while (true) {
|
|
if (!((k_3 < 3))) {
|
|
break;
|
|
};
|
|
highp vec4 tmpvar_32;
|
|
tmpvar_32 = (o_11.color + unity_LightColor[k_3].x);
|
|
o_11.color = tmpvar_32;
|
|
int tmpvar_33;
|
|
tmpvar_33 = (k_3 + 1);
|
|
z_2 = tmpvar_33;
|
|
int tmpvar_34;
|
|
tmpvar_34 = z_2;
|
|
k_3 = tmpvar_34;
|
|
};
|
|
return o_11;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
appdata xlt_v_35;
|
|
v2f xl_retval_36;
|
|
highp vec4 tmpvar_37;
|
|
tmpvar_37 = _glesVertex.xyzw;
|
|
highp vec4 tmpvar_38;
|
|
tmpvar_38 = tmpvar_37;
|
|
xlt_v_35.vertex = tmpvar_38;
|
|
mediump vec3 tmpvar_39;
|
|
tmpvar_39 = _glesNormal.xyz;
|
|
mediump vec3 tmpvar_40;
|
|
tmpvar_40 = tmpvar_39;
|
|
xlt_v_35.normal = tmpvar_40;
|
|
v2f tmpvar_41;
|
|
tmpvar_41 = xlat_main (xlt_v_35);
|
|
v2f tmpvar_42;
|
|
tmpvar_42 = tmpvar_41;
|
|
xl_retval_36 = tmpvar_42;
|
|
mediump vec4 tmpvar_43;
|
|
tmpvar_43 = xl_retval_36.pos.xyzw;
|
|
mediump vec4 tmpvar_44;
|
|
tmpvar_44 = tmpvar_43;
|
|
gl_Position = tmpvar_44;
|
|
mediump vec4 tmpvar_45;
|
|
tmpvar_45 = xl_retval_36.color.xyzw;
|
|
mediump vec4 tmpvar_46;
|
|
tmpvar_46 = tmpvar_45;
|
|
xlv_TEXCOORD0 = tmpvar_46;
|
|
}
|
|
|