OpenGL2: Fix TCGEN_ENVIRONMENT stages not rendering correctly.
This commit is contained in:
parent
a836c2db89
commit
f8355ba2fb
7 changed files with 34 additions and 19 deletions
|
@ -403,8 +403,11 @@ void R_SetupEntityLighting( const trRefdef_t *refdef, trRefEntity_t *ent ) {
|
|||
((byte *)&ent->ambientLightInt)[3] = 0xff;
|
||||
|
||||
// transform the direction to local space
|
||||
// no need to do this if using lightentity glsl shader
|
||||
VectorNormalize( lightDir );
|
||||
ent->modelLightDir[0] = DotProduct( lightDir, ent->e.axis[0] );
|
||||
ent->modelLightDir[1] = DotProduct( lightDir, ent->e.axis[1] );
|
||||
ent->modelLightDir[2] = DotProduct( lightDir, ent->e.axis[2] );
|
||||
|
||||
VectorCopy(lightDir, ent->lightDir);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue