bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-TreeCreatorLeavesRT-out.txt
2014-10-11 12:32:43 -07:00

67 lines
2.1 KiB
Text

uniform sampler2D _BumpSpecMap;
uniform float _Cutoff;
uniform sampler2D _MainTex;
uniform vec4 _SpecColor;
uniform vec4 _TerrainTreeLightColors[4];
uniform vec3 _TranslucencyColor;
uniform sampler2D _TranslucencyMap;
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;
vec3 albedo_8;
vec4 tmpvar_9;
tmpvar_9 = texture2D (_MainTex, tmpvar_1);
float x_10;
x_10 = (tmpvar_9.w - _Cutoff);
if ((x_10 < 0.0)) {
discard;
};
albedo_8 = (tmpvar_9.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 * albedo_8);
backContribs_5 = (gl_TexCoord[2].xyz * tmpvar_11.z);
light_6 = (light_6 + ((
(albedo_8 * ((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 + ((
(albedo_8 * ((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 + ((
(albedo_8 * ((backContribs_5.z * _TranslucencyColor) + tmpvar_2.z))
+
(_SpecColor.xyz * (pow (tmpvar_3.z, specular_7) * tmpvar_11.w))
) * _TerrainTreeLightColors[2].xyz));
c_4.xyz = (light_6 * 2.0);
c_4.w = 1.0;
gl_FragData[0] = c_4;
}
// stats: 35 alu 4 tex 1 flow
// inputs: 1
// #0: gl_TexCoord (high float) 4x1 [5] loc 4
// uniforms: 5 (total size: 0)
// #0: gl_LightModel (high other) 0x0 [-1]
// #1: _Cutoff (high float) 1x1 [-1]
// #2: _SpecColor (high float) 4x1 [-1]
// #3: _TerrainTreeLightColors (high float) 4x1 [4]
// #4: _TranslucencyColor (high float) 3x1 [-1]
// textures: 3
// #0: _BumpSpecMap (high 2d) 0x0 [-1]
// #1: _MainTex (high 2d) 0x0 [-1]
// #2: _TranslucencyMap (high 2d) 0x0 [-1]