bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-TreeCreatorLeavesRT-out.txt

56 lines
1.6 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
uniform sampler2D _BumpSpecMap;
2014-02-11 02:06:13 -05:00
uniform float _Cutoff;
uniform sampler2D _MainTex;
uniform vec4 _SpecColor;
uniform vec4 _TerrainTreeLightColors[4];
uniform vec3 _TranslucencyColor;
uniform sampler2D _TranslucencyMap;
2012-10-07 23:41:18 -04:00
void main ()
{
vec2 tmpvar_1;
tmpvar_1 = gl_TexCoord[0].xy;
vec3 tmpvar_2;
vec3 tmpvar_3;
tmpvar_2 = gl_TexCoord[3].xyz;
tmpvar_3 = gl_TexCoord[4].xyz;
vec4 c_4;
vec3 backContribs_5;
vec3 light_6;
float specular_7;
vec4 tmpvar_8;
tmpvar_8 = texture2D (_MainTex, tmpvar_1);
float x_9;
x_9 = (tmpvar_8.w - _Cutoff);
if ((x_9 < 0.0)) {
discard;
};
vec3 tmpvar_10;
tmpvar_10 = (tmpvar_8.xyz * gl_TexCoord[1].xyz);
specular_7 = (texture2D (_BumpSpecMap, tmpvar_1).x * 128.0);
vec4 tmpvar_11;
tmpvar_11 = texture2D (_TranslucencyMap, tmpvar_1);
light_6 = (gl_LightModel.ambient.xyz * tmpvar_10);
backContribs_5 = (gl_TexCoord[2].xyz * tmpvar_11.z);
2014-02-11 02:06:13 -05:00
light_6 = (light_6 + ((
(tmpvar_10 * ((backContribs_5.x * _TranslucencyColor) + tmpvar_2.x))
+
(_SpecColor.xyz * (pow (tmpvar_3.x, specular_7) * tmpvar_11.w))
) * _TerrainTreeLightColors[0].xyz));
light_6 = (light_6 + ((
(tmpvar_10 * ((backContribs_5.y * _TranslucencyColor) + tmpvar_2.y))
+
(_SpecColor.xyz * (pow (tmpvar_3.y, specular_7) * tmpvar_11.w))
) * _TerrainTreeLightColors[1].xyz));
light_6 = (light_6 + ((
(tmpvar_10 * ((backContribs_5.z * _TranslucencyColor) + tmpvar_2.z))
+
(_SpecColor.xyz * (pow (tmpvar_3.z, specular_7) * tmpvar_11.w))
) * _TerrainTreeLightColors[2].xyz));
2012-10-07 23:41:18 -04:00
c_4.xyz = (light_6 * 2.0);
c_4.w = 1.0;
gl_FragData[0] = c_4;
}
2014-02-11 02:06:13 -05:00
// inputs: 1, stats: 35 alu 4 tex 1 flow