bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-Hidden_Tree_Leaf_Shader_Rendertex-ir.txt
2014-02-10 23:06:13 -08:00

65 lines
1.2 KiB
Text

struct v2f {
vec4 pos;
vec2 uv;
vec3 color;
};
uniform float _HalfOverCutoff;
uniform sampler2D _MainTex;
void xll_clip (
in float x_1
)
{
if ((x_1 < 0.0)) {
discard;
};
}
vec4 frag (
in v2f i_2
)
{
vec4 col_3;
vec4 tmpvar_4;
tmpvar_4 = texture2D (_MainTex, i_2.uv);
vec4 tmpvar_5;
tmpvar_5 = tmpvar_4;
col_3 = tmpvar_5;
vec3 tmpvar_6;
tmpvar_6 = (col_3.xyz * (i_2.color * 2.0));
col_3.xyz = tmpvar_6.xyz.xyz;
float tmpvar_7;
tmpvar_7 = (col_3.w * (2.0 * _HalfOverCutoff));
col_3.w = vec4(tmpvar_7).w;
xll_clip ((col_3.w - 1.0));
return col_3;
}
void main ()
{
v2f xlt_i_8;
vec4 xl_retval_9;
vec4 tmpvar_10;
tmpvar_10 = vec4(0.0, 0.0, 0.0, 0.0);
xlt_i_8.pos = tmpvar_10;
vec2 tmpvar_11;
tmpvar_11 = gl_TexCoord[0].xy;
vec2 tmpvar_12;
tmpvar_12 = tmpvar_11;
xlt_i_8.uv = tmpvar_12;
vec3 tmpvar_13;
tmpvar_13 = gl_TexCoord[1].xyz;
vec3 tmpvar_14;
tmpvar_14 = tmpvar_13;
xlt_i_8.color = tmpvar_14;
vec4 tmpvar_15;
tmpvar_15 = frag (xlt_i_8);
vec4 tmpvar_16;
tmpvar_16 = tmpvar_15;
xl_retval_9 = tmpvar_16;
vec4 tmpvar_17;
tmpvar_17 = xl_retval_9.xyzw;
vec4 tmpvar_18;
tmpvar_18 = tmpvar_17;
gl_FragData[0] = tmpvar_18;
}