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;
|
2014-10-11 15:32:43 -04:00
|
|
|
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)) {
|
2012-10-07 23:41:18 -04:00
|
|
|
discard;
|
|
|
|
};
|
2014-10-11 15:32:43 -04:00
|
|
|
albedo_8 = (tmpvar_9.xyz * gl_TexCoord[1].xyz);
|
2012-10-07 23:41:18 -04:00
|
|
|
specular_7 = (texture2D (_BumpSpecMap, tmpvar_1).x * 128.0);
|
|
|
|
vec4 tmpvar_11;
|
|
|
|
tmpvar_11 = texture2D (_TranslucencyMap, tmpvar_1);
|
2014-10-11 15:32:43 -04:00
|
|
|
light_6 = (gl_LightModel.ambient.xyz * albedo_8);
|
2012-10-07 23:41:18 -04:00
|
|
|
backContribs_5 = (gl_TexCoord[2].xyz * tmpvar_11.z);
|
2014-02-11 02:06:13 -05:00
|
|
|
light_6 = (light_6 + ((
|
2014-10-11 15:32:43 -04:00
|
|
|
(albedo_8 * ((backContribs_5.x * _TranslucencyColor) + tmpvar_2.x))
|
2014-02-11 02:06:13 -05:00
|
|
|
+
|
|
|
|
(_SpecColor.xyz * (pow (tmpvar_3.x, specular_7) * tmpvar_11.w))
|
|
|
|
) * _TerrainTreeLightColors[0].xyz));
|
|
|
|
light_6 = (light_6 + ((
|
2014-10-11 15:32:43 -04:00
|
|
|
(albedo_8 * ((backContribs_5.y * _TranslucencyColor) + tmpvar_2.y))
|
2014-02-11 02:06:13 -05:00
|
|
|
+
|
|
|
|
(_SpecColor.xyz * (pow (tmpvar_3.y, specular_7) * tmpvar_11.w))
|
|
|
|
) * _TerrainTreeLightColors[1].xyz));
|
|
|
|
light_6 = (light_6 + ((
|
2014-10-11 15:32:43 -04:00
|
|
|
(albedo_8 * ((backContribs_5.z * _TranslucencyColor) + tmpvar_2.z))
|
2014-02-11 02:06:13 -05:00
|
|
|
+
|
|
|
|
(_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
|
|
|
|
2014-10-11 15:32:43 -04:00
|
|
|
// 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]
|