OpenGL2: Fix holodeck doors being black and not fading out

On Windows the opaque textures on the holodeck doors model were drawn
solid black and did not fade out.

Set up ref entity lightDir and modelLightDir as unit vectors. I am
guessing the vector lengths are being used as a divisor in a GLSL shader
or something.

Also clear directedLight so the same fields are set for RF_FULLBRIGHT as
all other ref entities.
This commit is contained in:
Zack Middleton 2018-06-01 18:27:14 -05:00
parent 0b0e10fba3
commit 74ec00ddaf
2 changed files with 12 additions and 2 deletions

View File

@ -309,7 +309,10 @@ void R_SetupEntityLighting( const trRefdef_t *refdef, trRefEntity_t *ent ) {
((byte *)&ent->ambientLightInt)[2] = 0x7F;
((byte *)&ent->ambientLightInt)[3] = 0xFF;
ent->lightDir[0] = ent->lightDir[1] = ent->lightDir[2] = 0;
ent->directedLight[0] = ent->directedLight[1] = ent->directedLight[2] = 0;
ent->lightDir[0] = ent->lightDir[1] = 0;
ent->lightDir[2] = 1;
return;
}
#endif

View File

@ -340,7 +340,14 @@ void R_SetupEntityLighting( const trRefdef_t *refdef, trRefEntity_t *ent ) {
((byte *)&ent->ambientLightInt)[2] = 0x7F;
((byte *)&ent->ambientLightInt)[3] = 0xFF;
ent->lightDir[0] = ent->lightDir[1] = ent->lightDir[2] = 0;
ent->directedLight[0] = ent->directedLight[1] = ent->directedLight[2] = 0;
ent->lightDir[0] = ent->lightDir[1] = 0;
ent->lightDir[2] = 1;
ent->modelLightDir[0] = DotProduct( ent->lightDir, ent->e.axis[0] );
ent->modelLightDir[1] = DotProduct( ent->lightDir, ent->e.axis[1] );
ent->modelLightDir[2] = DotProduct( ent->lightDir, ent->e.axis[2] );
return;
}
#endif