Fix shadow map acne and the attenuate flag
This commit is contained in:
parent
b660493051
commit
59ec97d2d5
2 changed files with 24 additions and 12 deletions
|
|
@ -109,8 +109,9 @@ bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, FD
|
|||
i = 1;
|
||||
}
|
||||
|
||||
float shadowIndex = (float)GLRenderer->mShadowMap.ShadowMapIndex(light);
|
||||
if (!!(light->flags4 & MF4_ATTENUATE)) // Store attenuate flag in the sign bit of the float
|
||||
// Store attenuate flag in the sign bit of the float.
|
||||
float shadowIndex = GLRenderer->mShadowMap.ShadowMapIndex(light) + 1.0f;
|
||||
if (!!(light->flags4 & MF4_ATTENUATE))
|
||||
shadowIndex = -shadowIndex;
|
||||
|
||||
float *data = &ldata.arrays[i][ldata.arrays[i].Reserve(8)];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue