prefect
875cb3bca1
Add an "instancing" model renderer to improve rendering of non-transparent, unanimated models. This renderer is used when the vertexshader path is rendering path is used. This was SVN commit r3052.
15 lines
380 B
GLSL
15 lines
380 B
GLSL
vec3 lighting(vec3 normal);
|
|
|
|
vec3 InstancingNormal(vec3 normal);
|
|
vec4 InstancingPosition(vec4 position);
|
|
|
|
void main()
|
|
{
|
|
vec3 normal = InstancingNormal(gl_Normal);
|
|
vec4 worldPos = InstancingPosition(gl_Vertex);
|
|
|
|
gl_FrontColor = gl_BackColor = vec4(lighting(normal),1.0) * gl_Color;
|
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
gl_Position = gl_ModelViewProjectionMatrix * worldPos;
|
|
}
|