bgfx/3rdparty/glsl-optimizer/tests/fragment/unity-Transparent_Cutout_Specular-out.txt

37 lines
1,018 B
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
uniform vec4 _SpecColor;
uniform float _Shininess;
uniform sampler2D _MainTex;
uniform vec4 _LightColor0;
uniform float _Cutoff;
uniform vec4 _Color;
void main ()
{
vec3 tmpvar_1;
tmpvar_1 = gl_TexCoord[1].xyz;
vec3 tmpvar_2;
tmpvar_2 = gl_TexCoord[2].xyz;
vec3 tmpvar_3;
tmpvar_3 = gl_TexCoord[3].xyz;
vec4 c;
vec4 tmpvar_4;
tmpvar_4 = texture2D (_MainTex, gl_TexCoord[0].xy);
vec3 tmpvar_5;
tmpvar_5 = (tmpvar_4.xyz * _Color.xyz);
float tmpvar_6;
tmpvar_6 = (tmpvar_4.w * _Color.w);
float x;
x = (tmpvar_6 - _Cutoff);
if ((x < 0.0)) {
discard;
};
vec4 c_i0;
float tmpvar_7;
tmpvar_7 = (pow (max (0.0, dot (tmpvar_1, normalize ((tmpvar_2 + normalize (tmpvar_3))))), (_Shininess * 128.0)) * tmpvar_4.w);
c_i0.xyz = ((((tmpvar_5 * _LightColor0.xyz) * max (0.0, dot (tmpvar_1, tmpvar_2))) + ((_LightColor0.xyz * _SpecColor.xyz) * tmpvar_7)) * 2.0);
c_i0.w = (tmpvar_6 + ((_LightColor0.w * _SpecColor.w) * tmpvar_7));
c = c_i0;
c.w = tmpvar_6;
gl_FragData[0] = c;
}