Shadow, fog, and lighting shader improvements#4743
Merged
past-due merged 19 commits intoWarzone2100:masterfrom Feb 3, 2026
Merged
Shadow, fog, and lighting shader improvements#4743past-due merged 19 commits intoWarzone2100:masterfrom
past-due merged 19 commits intoWarzone2100:masterfrom
Conversation
947a85a to
dd3303c
Compare
5fff0cf to
9171b7a
Compare
- swapped fog to range based version, removed unused vertexDistance, repacked stuff it used - fixed light in tcmask to fit removed tangent invert, reorganized its vertex shader, combined and moved its lighting to world space - fixed improperly working point lights with tangent space normals - fixed uv for water - fixed shadow acnes on some objects like roofs - fixed stepped shadow cascading, now it has smooth transition - added scale-slope bias that allowed to use shadow maps with terrain Co-Authored-By: MaNGusT- <MaNGusT-@users.noreply.github.com>
- fixed light formulas to exclude multiply of shadow mapping and shadow of diffuse light to prevent over-darkening - changed scale-slope depth bias formula to a faster variant - simplified ambient light calculation for terrain shader Co-authored-by: MaNGusT- <MaNGusT-@users.noreply.github.com>
Port OpenGL shader changes to Vulkan Co-Authored-By: MaNGusT- <MaNGusT-@users.noreply.github.com>
- fixed double multiply of shadows for hq models - fixed missed shadowing on intersected geometry in hq models - fixed some features (trees) that were visible through fog of war - adjust tcmask bias Co-Authored-By: MaNGusT- <MaNGusT-@users.noreply.github.com>
For a performance win on various test systems
53d1f32 to
b4d2843
Compare
ManManson
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remaining TODOs: