Always render vertex-lit surfaces with lightMapping shader. Enables realtime lights #1867
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on: #1866
Use the lightMapping GLSL shader instead of
generic
to render BSP surfaces that are vertex-lit due to an explicitrgbGen vertex
. This makes them use the same code path as BSP surfaces where vertex lighting is automatically selected due to the absence of a lightmap.So now it is possible to render realtime lights on explicitly vertex-lit surfaces, though they are still not as bright as they should be due to #1415.A good chunk of code has been removed/simplified since we no longer need a duplicate code path for vertex lighting in the
generic
shader. In the future the newly addedRSF_BSP
shader flag could also help to simplify things since we could use that instead of plumbing 'is BSP surface' conditions through various places in the engine.This targets 0.56 because it has the same effect as #1417 on the station15 plants, since the
lightMapping
shader never had the compatibility regression thatgeneric
did w.r.t alpha discard.I have run my screenshot test suite against the shaders from master of https://github.com/UnvanquishedAssets/map-station15_src.dpkdir (and other maps as normal) and found no regressions.