forked from 0ad/0ad
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.
15 lines
258 B
GLSL
15 lines
258 B
GLSL
uniform vec4 TextureMatrix1;
|
|
uniform vec4 TextureMatrix2;
|
|
uniform vec4 TextureMatrix3;
|
|
|
|
vec4 postouv1(vec4 pos)
|
|
{
|
|
vec3 tmp;
|
|
|
|
tmp.x = dot(TextureMatrix1, pos);
|
|
tmp.y = dot(TextureMatrix2, pos);
|
|
tmp.z = dot(TextureMatrix3, pos);
|
|
|
|
return vec4(tmp, 1.0);
|
|
}
|