Claude/fix fog of war bqam z#1253
Conversation
The volumetric raymarching Loop was breaking the entire shader silently. Reverting to the working 2D fog of war implementation until volumetric can be properly debugged. This restores: - Explored area desaturation + darkening - Unexplored area cloud overlay - Visibility edge rim glow https://claude.ai/code/session_013Hqn3PxBW8h7hpMNMKKv1e
Restored working 2D fog from d0f661f, then added volumetric fog that follows TSL Loop limitations: - NO texture sampling inside Loop (causes silent shader failure) - NO complex functions like fbm3 inside Loop - ONLY simple math: exp, mul, add, sub Volumetric implementation: - Sample visibility ONCE at surface (isUnexplored, exploredAmount) - Use that to modulate fog density throughout raymarch - Simple height-based density falloff inside loop - Beer-Lambert absorption for realistic fog - 32-48 raymarch steps based on quality Quality settings: - Low/Medium: 2D flat cloud overlay (no volumetric) - High: 2D + volumetric overlay (32 steps) - Ultra: 2D + volumetric overlay (48 steps) https://claude.ai/code/session_013Hqn3PxBW8h7hpMNMKKv1e
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecf2dfa9c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Apply unexplored effect (cloud overlay) | ||
| finalColor.assign(mix(finalColor, cloudColor, isUnexplored.mul(heightFactor))); |
There was a problem hiding this comment.
Skip 2D cloud overlay when volumetric fog is enabled
For high/ultra quality you now always apply the flat unexplored cloud overlay before the volumetric mix, but the volumetric path is intended to replace the 2D overlay (per the existing comments and prior behavior). With useVolumetric true, finalColor already has the 2D cloud darkening baked in, and then you mix in volumetric fog on top, so unexplored areas get double-darkened/washed compared to low/medium. This is a regression in the high/ultra visual output; consider gating the overlay with useVolumetric or moving it into the low/medium branch.
Useful? React with 👍 / 👎.
No description provided.