bgfx/3rdparty/glsl-optimizer/tests/vertex/unity-Hidden_Tree_Bark_Shader_Rendertex-out.txt
Branimir Karadzic dee3fe5266 Initial commit.
2012-04-03 20:30:07 -07:00

21 lines
951 B
Text

uniform vec3 _TerrainTreeLightDirections[4];
uniform vec4 _TerrainTreeLightColors[4];
void main ()
{
vec3 lightColor;
lightColor = gl_LightModel.ambient.xyz;
lightColor = (lightColor + (_TerrainTreeLightColors[0] * max (0.0, dot (_TerrainTreeLightDirections[0], gl_Normal))).xyz);
lightColor = (lightColor + (_TerrainTreeLightColors[1] * max (0.0, dot (_TerrainTreeLightDirections[1], gl_Normal))).xyz);
lightColor = (lightColor + (_TerrainTreeLightColors[2] * max (0.0, dot (_TerrainTreeLightDirections[2], gl_Normal))).xyz);
lightColor = (lightColor + (_TerrainTreeLightColors[3] * max (0.0, dot (_TerrainTreeLightDirections[3], gl_Normal))).xyz);
gl_Position = (gl_ModelViewProjectionMatrix * gl_Vertex);
vec4 tmpvar_1;
tmpvar_1.zw = vec2(0.0, 0.0);
tmpvar_1.xy = gl_MultiTexCoord0.xy;
gl_TexCoord[0] = tmpvar_1;
vec4 tmpvar_2;
tmpvar_2.w = 0.0;
tmpvar_2.xyz = (lightColor * gl_Color.w);
gl_TexCoord[1] = tmpvar_2;
}