You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
renderer: implement not-clamped mapOverBright in GLSL
We cannot overBright separate stage as stage are clamped
within [0.0, 1.0] when blending multiple stages together,
meaning the result of the multiplication of a separate
light stage with a light factor will be clamped before
blending it with the color map.
This implementation implements overBright in the camera
shader, but to only apply this overBright to surfaces having
received lights, surfaces that do not receive lights gets
divided by the light factor in a way re-multiplying them
cancels the division.
Stages and surfaces to be blended over other stages or
surfaces are also divided to avoid multiplying multiple
time the same surface, in order to have the final result
being (m * a) + b instead of m * (a + b) wich would be
(m * a) + (m * b) and then sump up the factor, something
we don't want to do.
The legacy code for overbrighting (but clamping) the light at
BSP load is kept for when the feature is disabled, but rewritten
to make the code better.
0 commit comments