diff options
Diffstat (limited to 'src/renderergl2/tr_light.c')
-rw-r--r-- | src/renderergl2/tr_light.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/renderergl2/tr_light.c b/src/renderergl2/tr_light.c index ba493198..01ce46d2 100644 --- a/src/renderergl2/tr_light.c +++ b/src/renderergl2/tr_light.c @@ -404,8 +404,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); } |