Skip to content

Shadow, fog, and lighting shader improvements#4743

Merged
past-due merged 19 commits intoWarzone2100:masterfrom
past-due:2025_12_gfx_improvements_3
Feb 3, 2026
Merged

Shadow, fog, and lighting shader improvements#4743
past-due merged 19 commits intoWarzone2100:masterfrom
past-due:2025_12_gfx_improvements_3

Conversation

@past-due
Copy link
Copy Markdown
Member

@past-due past-due commented Dec 24, 2025

Remaining TODOs:

  • Fix classic / normal terrain shaders
  • Port changes to Vulkan shaders

@past-due past-due force-pushed the 2025_12_gfx_improvements_3 branch 2 times, most recently from 947a85a to dd3303c Compare January 21, 2026 21:32
Comment thread src/texture.cpp Fixed
@past-due past-due force-pushed the 2025_12_gfx_improvements_3 branch 3 times, most recently from 5fff0cf to 9171b7a Compare January 23, 2026 04:03
past-due and others added 19 commits February 3, 2026 12:49
- 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
@past-due past-due force-pushed the 2025_12_gfx_improvements_3 branch from 53d1f32 to b4d2843 Compare February 3, 2026 18:14
@past-due past-due changed the title WIP: Shadow and fog shader improvements Shadow and fog shader improvements Feb 3, 2026
@past-due past-due changed the title Shadow and fog shader improvements Shadow, fog, and lighting shader improvements Feb 3, 2026
@past-due past-due marked this pull request as ready for review February 3, 2026 18:40
@past-due past-due added this to the 4.6.3 milestone Feb 3, 2026
@ManManson ManManson self-requested a review February 3, 2026 19:43
@past-due past-due merged commit b9405e1 into Warzone2100:master Feb 3, 2026
40 checks passed
@past-due past-due deleted the 2025_12_gfx_improvements_3 branch February 3, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants