Skip to content

feat: Draw Sky after drawing main geometry#369

Merged
kirides merged 5 commits into
masterfrom
feat/sky-z
Jun 9, 2026
Merged

feat: Draw Sky after drawing main geometry#369
kirides merged 5 commits into
masterfrom
feat/sky-z

Conversation

@kirides

@kirides kirides commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Overrides some parts of the Fixed-Function-Pipeline to make it possible to render the sky after the main geometry.

This helps to reduce full-screen pixel shader invocations by making use of early-z through using the depth buffer. Most of the sky is "hidden" behind mesh anyway.

This currently works by overriding the Z position of the sky dome and everything inside "Draw-Sky" to 0 (max reverse-Z)

So this MAY introduce subtle bugs where some "volumetric" sky effect, like thunder infront of player, could be displayed incorrectly.
But the sky dome should not render things "in front" anyways, as it is overdrawn by the main geometry pass.

  • We now draw the sky directly onto the HDR backbuffer instead of composing it on-top of our Geometry buffer data. This way we can have much higher precision and less banding when drawing the sky.
  • Use correct fog clear color for atmospheric scattering enabled fog.
  • adjusted default fog color for Addonworld to a more "bright-ish" blue

@kirides kirides merged commit a9d35c8 into master Jun 9, 2026
24 checks passed
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.

1 participant