Skip to content

Claude/fix fog of war bqam z#1253

Merged
braedonsaunders merged 2 commits into
mainfrom
claude/fix-fog-of-war-BqamZ
Feb 3, 2026
Merged

Claude/fix fog of war bqam z#1253
braedonsaunders merged 2 commits into
mainfrom
claude/fix-fog-of-war-BqamZ

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

No description provided.

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
@braedonsaunders braedonsaunders merged commit 3842844 into main Feb 3, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +913 to +914
// Apply unexplored effect (cloud overlay)
finalColor.assign(mix(finalColor, cloudColor, isUnexplored.mul(heightFactor)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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.

2 participants