1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 03:32:36 +00:00

Don't clamp individual light contribution in shaders as FFP doesn't do this

This commit is contained in:
Alexei Kotov 2024-05-23 18:06:10 +03:00
parent d15be7a685
commit f87aa02390

View File

@ -106,8 +106,6 @@ float lcalcRadius(int lightIndex)
float lcalcIllumination(int lightIndex, float dist)
{
float illumination = 1.0 / (lcalcConstantAttenuation(lightIndex) + lcalcLinearAttenuation(lightIndex) * dist + lcalcQuadraticAttenuation(lightIndex) * dist * dist);
// FIXME: FFP doesn't do this
illumination = clamp(illumination, 0.0, 1.0);
#if @lightingMethodPerObjectUniform || @lightingMethodUBO
// Fade illumination between the radius and the radius doubled to diminish pop-in
illumination *= 1.0 - quickstep((dist / lcalcRadius(lightIndex)) - 1.0);