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

39 lines
967 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-10-11 15:32:43 -04:00
for (int j_3 = 0; j_3 < loopCount_4; j_3++) {
light_5 = (light_5 + ((col_6.xyz *
2014-02-11 02:06:13 -05:00
tmpvar_2[j_3]
) * _TerrainTreeLightColors[j_3].xyz));
2012-10-07 23:41:18 -04:00
};
2014-10-11 15:32:43 -04:00
mediump vec4 tmpvar_8;
tmpvar_8.w = 1.0;
tmpvar_8.xyz = light_5;
tmpvar_1 = tmpvar_8;
2012-10-07 23:41:18 -04:00
gl_FragData[0] = tmpvar_1;
}
2014-02-11 02:06:13 -05:00
2014-10-11 15:32:43 -04:00
// stats: 11 alu 1 tex 2 flow
// inputs: 2
// #0: xlv_uv (high float) 2x1 [-1]
// #1: xlv_nl (high float) 3x1 [-1]
// uniforms: 1 (total size: 0)
// #0: _TerrainTreeLightColors (high float) 4x1 [4]
// textures: 1
// #0: _MainTex (low 2d) 0x0 [-1]