prefect
e2bbd9a654
This is a huge patch, including: * add a LitRenderModifier abstract base class for RenderModifiers with shadow+light * add LitRenderModifiers for all types of models * add STREAM_TEXGENTOUV1 to request generation of shadow map texcoords for models * create facilities to pass the texture matrix from the RenderModifier (fragment stage) to the ModelRenderer (vertex stage) * split ambient and diffuse terms of lighting until further down in the pipeline; this is necessary since shadowed regions receive only ambient light * small improvement in how RenderPathVertexShader scales to a greater number of vertex shaders This was SVN commit r3690.
11 lines
234 B
GLSL
11 lines
234 B
GLSL
vec3 lighting(vec3 normal);
|
|
vec4 postouv1(vec4 pos);
|
|
|
|
void main()
|
|
{
|
|
gl_FrontColor = vec4(lighting(gl_Normal),1.0) * gl_Color;
|
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
gl_TexCoord[1] = postouv1(gl_Vertex);
|
|
gl_Position = ftransform();
|
|
}
|