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

152 lines
6.5 KiB
Text
Raw Normal View History

2014-10-11 15:32:43 -04:00
#version 300 es
uniform vec4 unity_AmbientGround;
uniform vec4 unity_AmbientSky;
uniform vec4 unity_MatrixVP[4];
uniform vec4 unity_MatrixV[4];
uniform vec4 glstate_lightmodel_ambient;
uniform vec4 glstate_matrix_projection[4];
uniform vec4 unity_LODFade;
uniform vec4 unity_Scale;
uniform vec4 _World2Object[4];
uniform vec4 _Object2World[4];
uniform vec4 glstate_matrix_invtrans_modelview0[4];
uniform vec4 glstate_matrix_modelview0[4];
uniform vec4 glstate_matrix_mvp[4];
uniform vec4 unity_SHC;
uniform vec4 unity_SHBb;
uniform vec4 unity_SHBg;
uniform vec4 unity_SHBr;
uniform vec4 unity_SHAb;
uniform vec4 unity_SHAg;
uniform vec4 unity_SHAr;
uniform vec4 unity_SpotDirection[8];
uniform vec4 unity_LightAtten[8];
uniform vec4 unity_LightPosition[8];
uniform vec4 unity_LightColor[8];
uniform vec4 unity_4LightAtten0;
uniform vec4 unity_4LightPosZ0;
uniform vec4 unity_4LightPosY0;
uniform vec4 unity_4LightPosX0;
uniform vec4 _LightPositionRange;
uniform vec4 _WorldSpaceLightPos0;
uniform vec4 _MainTex_ST;
uniform vec4 unity_ColorSpaceGrey;
in vec4 dcl_Input0_POSITION0;
in vec4 dcl_Input1_NORMAL0;
in vec4 dcl_Input2_TEXCOORD0;
out vec4 VtxGeoOutput1_TEXCOORD0;
out vec4 VtxGeoOutput2_COLOR0;
vec4 Temp_0;
vec4 Temp_1;
vec4 Temp_2;
vec4 Temp_3;
int tmpvar_1;
void main ()
{
Temp_0 = (dcl_Input0_POSITION0.yyyy * glstate_matrix_mvp[1]);
Temp_0 = ((glstate_matrix_mvp[0] * dcl_Input0_POSITION0.xxxx) + Temp_0);
Temp_0 = ((glstate_matrix_mvp[2] * dcl_Input0_POSITION0.zzzz) + Temp_0);
vec4 tmpvar_2;
tmpvar_2 = ((glstate_matrix_mvp[3] * dcl_Input0_POSITION0.wwww) + Temp_0);
VtxGeoOutput1_TEXCOORD0.xy = ((dcl_Input2_TEXCOORD0.xyxx * _MainTex_ST.xyxx) + _MainTex_ST.zwzz).xy;
Temp_0.xyz = (dcl_Input0_POSITION0.yyyy * glstate_matrix_modelview0[1].xyzx).xyz;
Temp_0.xyz = ((glstate_matrix_modelview0[0].xyzx * dcl_Input0_POSITION0.xxxx) + Temp_0.xyzx).xyz;
Temp_0.xyz = ((glstate_matrix_modelview0[2].xyzx * dcl_Input0_POSITION0.zzzz) + Temp_0.xyzx).xyz;
Temp_0.xyz = ((glstate_matrix_modelview0[3].xyzx * dcl_Input0_POSITION0.wwww) + Temp_0.xyzx).xyz;
Temp_1.xyz = (dcl_Input1_NORMAL0.yyyy * glstate_matrix_invtrans_modelview0[1].xyzx).xyz;
Temp_1.xyz = ((glstate_matrix_invtrans_modelview0[0].xyzx * dcl_Input1_NORMAL0.xxxx) + Temp_1.xyzx).xyz;
Temp_1.xyz = ((glstate_matrix_invtrans_modelview0[2].xyzx * dcl_Input1_NORMAL0.zzzz) + Temp_1.xyzx).xyz;
Temp_0.w = dot (Temp_1.xyz, Temp_1.xyz);
Temp_0.w = inversesqrt(Temp_0.w);
Temp_1.xyz = (Temp_0.wwww * Temp_1.xyzx).xyz;
Temp_2.xyz = glstate_lightmodel_ambient.xyz;
tmpvar_1 = 0;
Temp_3.xyz = ((-(Temp_0.xyzx) * unity_LightPosition[tmpvar_1].wwww) + unity_LightPosition[tmpvar_1].xyzx).xyz;
Temp_1.w = dot (Temp_3.xyz, Temp_3.xyz);
Temp_2.w = ((Temp_1.w * unity_LightAtten[tmpvar_1].z) + 1.0);
Temp_2.w = (1.0/(Temp_2.w));
Temp_1.w = inversesqrt(Temp_1.w);
Temp_3.xyz = (Temp_1.wwww * Temp_3.xyzx).xyz;
Temp_1.w = dot (Temp_1.xyz, Temp_3.xyz);
Temp_1.w = max (Temp_1.w, 0.0);
Temp_1.w = (Temp_1.w * Temp_2.w);
Temp_2.xyz = ((unity_LightColor[tmpvar_1].xyzx * Temp_1.wwww) + glstate_lightmodel_ambient.xyzx).xyz;
tmpvar_1++;
Temp_3.xyz = ((-(Temp_0.xyzx) * unity_LightPosition[tmpvar_1].wwww) + unity_LightPosition[tmpvar_1].xyzx).xyz;
Temp_1.w = dot (Temp_3.xyz, Temp_3.xyz);
Temp_2.w = ((Temp_1.w * unity_LightAtten[tmpvar_1].z) + 1.0);
Temp_2.w = (1.0/(Temp_2.w));
Temp_1.w = inversesqrt(Temp_1.w);
Temp_3.xyz = (Temp_1.wwww * Temp_3.xyzx).xyz;
Temp_1.w = dot (Temp_1.xyz, Temp_3.xyz);
Temp_1.w = max (Temp_1.w, 0.0);
Temp_1.w = (Temp_1.w * Temp_2.w);
Temp_2.xyz = ((unity_LightColor[tmpvar_1].xyzx * Temp_1.wwww) + Temp_2.xyzx).xyz;
tmpvar_1++;
Temp_3.xyz = ((-(Temp_0.xyzx) * unity_LightPosition[tmpvar_1].wwww) + unity_LightPosition[tmpvar_1].xyzx).xyz;
Temp_1.w = dot (Temp_3.xyz, Temp_3.xyz);
Temp_2.w = ((Temp_1.w * unity_LightAtten[tmpvar_1].z) + 1.0);
Temp_2.w = (1.0/(Temp_2.w));
Temp_1.w = inversesqrt(Temp_1.w);
Temp_3.xyz = (Temp_1.wwww * Temp_3.xyzx).xyz;
Temp_1.w = dot (Temp_1.xyz, Temp_3.xyz);
Temp_1.w = max (Temp_1.w, 0.0);
Temp_1.w = (Temp_1.w * Temp_2.w);
Temp_2.xyz = ((unity_LightColor[tmpvar_1].xyzx * Temp_1.wwww) + Temp_2.xyzx).xyz;
tmpvar_1++;
Temp_3.xyz = ((-(Temp_0.xyzx) * unity_LightPosition[tmpvar_1].wwww) + unity_LightPosition[tmpvar_1].xyzx).xyz;
Temp_1.w = dot (Temp_3.xyz, Temp_3.xyz);
Temp_2.w = ((Temp_1.w * unity_LightAtten[tmpvar_1].z) + 1.0);
Temp_2.w = (1.0/(Temp_2.w));
Temp_1.w = inversesqrt(Temp_1.w);
Temp_3.xyz = (Temp_1.wwww * Temp_3.xyzx).xyz;
Temp_1.w = dot (Temp_1.xyz, Temp_3.xyz);
Temp_1.w = max (Temp_1.w, 0.0);
Temp_1.w = (Temp_1.w * Temp_2.w);
Temp_2.xyz = ((unity_LightColor[tmpvar_1].xyzx * Temp_1.wwww) + Temp_2.xyzx).xyz;
tmpvar_1++;
VtxGeoOutput2_COLOR0.xyz = (Temp_2.xyzx + Temp_2.xyzx).xyz;
VtxGeoOutput2_COLOR0.w = 1.0;
gl_Position = tmpvar_2;
}
// stats: 87 alu 0 tex 0 flow
// inputs: 3
// #0: dcl_Input0_POSITION0 (high float) 4x1 [-1]
// #1: dcl_Input1_NORMAL0 (high float) 4x1 [-1]
// #2: dcl_Input2_TEXCOORD0 (high float) 4x1 [-1]
// uniforms: 32 (total size: 0)
// #0: unity_AmbientGround (high float) 4x1 [-1]
// #1: unity_AmbientSky (high float) 4x1 [-1]
// #2: unity_MatrixVP (high float) 4x1 [4]
// #3: unity_MatrixV (high float) 4x1 [4]
// #4: glstate_lightmodel_ambient (high float) 4x1 [-1]
// #5: glstate_matrix_projection (high float) 4x1 [4]
// #6: unity_LODFade (high float) 4x1 [-1]
// #7: unity_Scale (high float) 4x1 [-1]
// #8: _World2Object (high float) 4x1 [4]
// #9: _Object2World (high float) 4x1 [4]
// #10: glstate_matrix_invtrans_modelview0 (high float) 4x1 [4]
// #11: glstate_matrix_modelview0 (high float) 4x1 [4]
// #12: glstate_matrix_mvp (high float) 4x1 [4]
// #13: unity_SHC (high float) 4x1 [-1]
// #14: unity_SHBb (high float) 4x1 [-1]
// #15: unity_SHBg (high float) 4x1 [-1]
// #16: unity_SHBr (high float) 4x1 [-1]
// #17: unity_SHAb (high float) 4x1 [-1]
// #18: unity_SHAg (high float) 4x1 [-1]
// #19: unity_SHAr (high float) 4x1 [-1]
// #20: unity_SpotDirection (high float) 4x1 [8]
// #21: unity_LightAtten (high float) 4x1 [8]
// #22: unity_LightPosition (high float) 4x1 [8]
// #23: unity_LightColor (high float) 4x1 [8]
// #24: unity_4LightAtten0 (high float) 4x1 [-1]
// #25: unity_4LightPosZ0 (high float) 4x1 [-1]
// #26: unity_4LightPosY0 (high float) 4x1 [-1]
// #27: unity_4LightPosX0 (high float) 4x1 [-1]
// #28: _LightPositionRange (high float) 4x1 [-1]
// #29: _WorldSpaceLightPos0 (high float) 4x1 [-1]
// #30: _MainTex_ST (high float) 4x1 [-1]
// #31: unity_ColorSpaceGrey (high float) 4x1 [-1]