bgfx/3rdparty/glsl-optimizer/tests/fragment/loop-forunbounded-outES.txt

34 lines
803 B
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
uniform sampler2D _MainTex;
2014-02-11 02:06:13 -05:00
uniform highp vec4 _TerrainTreeLightColors[4];
varying highp vec2 xlv_uv;
varying highp vec3 xlv_nl;
2012-10-07 23:41:18 -04:00
void main ()
{
lowp vec4 tmpvar_1;
highp vec3 tmpvar_2;
tmpvar_2 = xlv_nl;
int loopCount_4;
mediump vec3 light_5;
lowp vec4 col_6;
lowp vec4 tmpvar_7;
tmpvar_7 = texture2D (_MainTex, xlv_uv);
col_6 = tmpvar_7;
light_5 = vec3(0.0, 0.0, 0.0);
loopCount_4 = int((tmpvar_7.w * 10.0));
2014-02-11 02:06:13 -05:00
for (int j_3; j_3 < loopCount_4; j_3++) {
2012-10-07 23:41:18 -04:00
highp vec3 tmpvar_8;
2014-02-11 02:06:13 -05:00
tmpvar_8 = (light_5 + ((col_6.xyz *
tmpvar_2[j_3]
) * _TerrainTreeLightColors[j_3].xyz));
2012-10-07 23:41:18 -04:00
light_5 = tmpvar_8;
};
mediump vec4 tmpvar_9;
tmpvar_9.w = 1.0;
tmpvar_9.xyz = light_5;
tmpvar_1 = tmpvar_9;
gl_FragData[0] = tmpvar_1;
}
2014-02-11 02:06:13 -05:00
// inputs: 2, stats: 11 alu 1 tex 2 flow