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

33 lines
925 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;
mediump vec3 light_2;
lowp vec4 tmpvar_3;
tmpvar_3 = texture2D (_MainTex, xlv_uv);
if ((tmpvar_3.w < 0.5)) {
discard;
};
2014-10-11 15:32:43 -04:00
light_2 = ((tmpvar_3.xyz * xlv_nl.x) * _TerrainTreeLightColors[0].xyz);
light_2 = (light_2 + ((tmpvar_3.xyz * xlv_nl.y) * _TerrainTreeLightColors[1].xyz));
light_2 = (light_2 + ((tmpvar_3.xyz * xlv_nl.z) * _TerrainTreeLightColors[2].xyz));
mediump vec4 tmpvar_4;
tmpvar_4.w = 1.0;
tmpvar_4.xyz = light_2;
tmpvar_1 = tmpvar_4;
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: 10 alu 2 tex 1 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]