2012-10-07 23:41:18 -04:00
|
|
|
uniform vec4 _TerrainTreeLightColors[4];
|
2014-02-11 02:06:13 -05:00
|
|
|
uniform vec3 _TerrainTreeLightDirections[4];
|
2012-10-07 23:41:18 -04:00
|
|
|
void main ()
|
|
|
|
{
|
|
|
|
vec3 lightColor_1;
|
|
|
|
lightColor_1 = gl_LightModel.ambient.xyz;
|
2014-02-11 02:06:13 -05:00
|
|
|
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[0] * max (0.0,
|
|
|
|
dot (_TerrainTreeLightDirections[0], gl_Normal)
|
|
|
|
)).xyz);
|
|
|
|
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[1] * max (0.0,
|
|
|
|
dot (_TerrainTreeLightDirections[1], gl_Normal)
|
|
|
|
)).xyz);
|
|
|
|
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[2] * max (0.0,
|
|
|
|
dot (_TerrainTreeLightDirections[2], gl_Normal)
|
|
|
|
)).xyz);
|
|
|
|
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[3] * max (0.0,
|
|
|
|
dot (_TerrainTreeLightDirections[3], gl_Normal)
|
|
|
|
)).xyz);
|
2012-10-07 23:41:18 -04:00
|
|
|
gl_Position = (gl_ModelViewProjectionMatrix * gl_Vertex);
|
|
|
|
vec4 tmpvar_2;
|
|
|
|
tmpvar_2.zw = vec2(0.0, 0.0);
|
|
|
|
tmpvar_2.xy = gl_MultiTexCoord0.xy;
|
|
|
|
gl_TexCoord[0] = tmpvar_2;
|
|
|
|
vec4 tmpvar_3;
|
|
|
|
tmpvar_3.w = 0.0;
|
|
|
|
tmpvar_3.xyz = (lightColor_1 * gl_Color.w);
|
|
|
|
gl_TexCoord[1] = tmpvar_3;
|
|
|
|
}
|
|
|
|
|
2014-02-11 02:06:13 -05:00
|
|
|
|
|
|
|
// inputs: 4, stats: 20 alu 0 tex 0 flow
|