bgfx/3rdparty/glsl-optimizer/tests/vertex/loops-for-out.txt

42 lines
1.2 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
uniform mat4 UNITY_MATRIX_IT_MV;
2014-02-11 02:06:13 -05:00
uniform mat4 UNITY_MATRIX_MV;
uniform mat4 UNITY_MATRIX_MVP;
uniform vec4 unity_LightAtten[4];
uniform vec4 unity_LightColor[4];
uniform vec4 unity_LightPosition[4];
varying vec4 xlv_TEXCOORD0;
2012-04-03 23:30:07 -04:00
void main ()
{
2012-10-07 23:41:18 -04:00
vec3 lightColor_1;
vec3 viewN_2;
vec3 viewpos_3;
viewpos_3 = (UNITY_MATRIX_MV * gl_Vertex).xyz;
mat3 tmpvar_4;
tmpvar_4[0] = UNITY_MATRIX_IT_MV[0].xyz;
tmpvar_4[1] = UNITY_MATRIX_IT_MV[1].xyz;
tmpvar_4[2] = UNITY_MATRIX_IT_MV[2].xyz;
viewN_2 = (tmpvar_4 * gl_Normal);
vec3 tmpvar_5;
tmpvar_5 = (unity_LightPosition[0].xyz - viewpos_3);
2014-02-11 02:06:13 -05:00
lightColor_1 = (unity_LightColor[0].xyz * (max (0.0,
dot (viewN_2, normalize(tmpvar_5))
) * (1.0/(
(1.0 + (dot (tmpvar_5, tmpvar_5) * unity_LightAtten[0].z))
))));
2012-10-07 23:41:18 -04:00
vec3 tmpvar_6;
tmpvar_6 = (unity_LightPosition[1].xyz - viewpos_3);
2014-02-11 02:06:13 -05:00
lightColor_1 = (lightColor_1 + (unity_LightColor[1].xyz * (
max (0.0, dot (viewN_2, normalize(tmpvar_6)))
*
(1.0/((1.0 + (dot (tmpvar_6, tmpvar_6) * unity_LightAtten[1].z))))
)));
2012-10-07 23:41:18 -04:00
vec4 tmpvar_7;
tmpvar_7.w = 1.0;
tmpvar_7.xyz = (lightColor_1 * 2.0);
2012-04-03 23:30:07 -04:00
gl_Position = (UNITY_MATRIX_MVP * gl_Vertex);
2012-10-07 23:41:18 -04:00
xlv_TEXCOORD0 = tmpvar_7;
2012-04-03 23:30:07 -04:00
}
2014-02-11 02:06:13 -05:00
// inputs: 2, stats: 26 alu 0 tex 0 flow