mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- remove shadow acne when dynlights perfectly align with planes
This commit is contained in:
parent
2cd1734de3
commit
0c4602507e
1 changed files with 1 additions and 0 deletions
|
@ -334,6 +334,7 @@ float shadowmapAttenuation(vec4 lightpos, float shadowIndex)
|
||||||
return 1.0; // No shadowmap available for this light
|
return 1.0; // No shadowmap available for this light
|
||||||
|
|
||||||
vec3 planePoint = pixelpos.xyz - lightpos.xyz;
|
vec3 planePoint = pixelpos.xyz - lightpos.xyz;
|
||||||
|
planePoint += 0.01; // nudge light position slightly as Doom maps tend to have their lights perfectly aligned with planes
|
||||||
|
|
||||||
if (dot(planePoint.xz, planePoint.xz) < 1.0)
|
if (dot(planePoint.xz, planePoint.xz) < 1.0)
|
||||||
return 1.0; // Light is too close
|
return 1.0; // Light is too close
|
||||||
|
|
Loading…
Reference in a new issue