OpenGL2: Fix black planar projection shadows (cg_shadows 3)
Restore MD3 code for cg_shadows 2 and 3 like other model formats. Fix planar projection shadow deform (cg_shadows 3) to use correct light direction. I fixed light direction for stencil shadows (cg_shadows 2) but it's still broken.
This commit is contained in:
parent
09a23e0417
commit
102c79eb49
2 changed files with 23 additions and 7 deletions
|
@ -162,7 +162,7 @@ void RB_ShadowTessEnd( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
VectorCopy( backEnd.currentEntity->lightDir, lightDir );
|
||||
VectorCopy( backEnd.currentEntity->modelLightDir, lightDir );
|
||||
|
||||
// project vertexes away from light direction
|
||||
for ( i = 0 ; i < tess.numVertexes ; i++ ) {
|
||||
|
@ -302,7 +302,7 @@ void RB_ProjectionShadowDeform( void ) {
|
|||
|
||||
groundDist = backEnd.or.origin[2] - backEnd.currentEntity->e.shadowPlane;
|
||||
|
||||
VectorCopy( backEnd.currentEntity->lightDir, lightDir );
|
||||
VectorCopy( backEnd.currentEntity->modelLightDir, lightDir );
|
||||
d = DotProduct( lightDir, ground );
|
||||
// don't let the shadows get too long or go negative
|
||||
if ( d < 0.5 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue