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
Multiply lightmaps and light grid by the light factor right when they
are used, instead of the elaborate canceling system. Vertex light
multiplication in lightmapped stages is handled by the scaling of the
white image lightmap (treated as 4.0). Various bugs will be fixed, since
the canceling approach relied on detecting an enormous amount of special
cases and not all of them were handled.
In a few places there can be issues with intermediate color buffer values
exceeding 1.0, but this is worked around (on reasonably good hardware) by
the previous commit setting up an RGBA16F framebuffer. When limited to
RGBA8 framebuffers, as can be tried with r_highPrecisionRendering 0,
this rewrite is a mixed bag. In some places it leads to clamping in the
color buffer (example: Pulse viewpos 4822 -1312 -1314 98 13), while in
others it improves results due to the effective 2 extra bits of
precision in the framebuffer (example: Procyon viewpos -955 3443 276 94
7).
There are a few cases where lightmap/lightgrid scaling doesn't apply
that required special handling:
- For intermediate stages of light styles, the already-existing
detection of STYLELIGHTMAP and STYLECOLORMAP is used. For these stage
types u_Color is scaled by the light factor. Example: metro-b1-2
viewpos -1172 627 107 94 -21.
- For non-lightmapped vertex-lit surfaces, u_ColorModulate is scaled
by the light factor. Example: station15 small plants.
- For fullbright lightmapped stages, the light factor is set to 1.
Example: Procyon star chart.
Some bugs (in non-clamped overbright mode) that are fixed by this commit:
- Non-lightmapped vertex-lit surfaces (like the station15 plants) are
now scaled by the light factor as they should be.
- Procyon star chart is no longer too dark with material system.
- Glowmap-like stage implemented with q3 syntax in a control panel
shader are no longer wrongly overbright-scaled, causing visual noise.
zittrig-arena viewpos 1201 -301 -338 87 0
Co-authored-by: Thomas Debesse <dev@illwieckz.net>
0 commit comments