Skip to content

fix: restore MeshStandardNodeMaterial and normal encoding for water r…#1335

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/investigate-water-rendering-9GuJz
Feb 4, 2026
Merged

fix: restore MeshStandardNodeMaterial and normal encoding for water r…#1335
braedonsaunders merged 1 commit into
mainfrom
claude/investigate-water-rendering-9GuJz

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

…endering

The water was not rendering because:

  1. MeshPhysicalNodeMaterial was incorrectly used (IOR-based approach)
  2. normalNode was returning [-1,1] range when TSL expects [0,1] encoded

Changes:

  • Switch back to MeshStandardNodeMaterial for consistent PBR
  • Add .mul(0.5).add(0.5) encoding to normalNode (matches TerrainMaterial)
  • Remove WATER_IOR constant (not needed with MeshStandardNodeMaterial)
  • Update documentation to clarify TSL normalNode convention

The white-out issue was caused by double-lighting (manual fresnel/specular in colorNode combined with PBR pipeline), not normal encoding. The previous fixes correctly removed manual lighting; this commit restores the normal encoding that TSL requires.

https://claude.ai/code/session_01ChDF73v8WwcjKe7cWV82iB

…endering

The water was not rendering because:
1. MeshPhysicalNodeMaterial was incorrectly used (IOR-based approach)
2. normalNode was returning [-1,1] range when TSL expects [0,1] encoded

Changes:
- Switch back to MeshStandardNodeMaterial for consistent PBR
- Add .mul(0.5).add(0.5) encoding to normalNode (matches TerrainMaterial)
- Remove WATER_IOR constant (not needed with MeshStandardNodeMaterial)
- Update documentation to clarify TSL normalNode convention

The white-out issue was caused by double-lighting (manual fresnel/specular
in colorNode combined with PBR pipeline), not normal encoding. The previous
fixes correctly removed manual lighting; this commit restores the normal
encoding that TSL requires.

https://claude.ai/code/session_01ChDF73v8WwcjKe7cWV82iB
@braedonsaunders braedonsaunders merged commit 5c5577f into main Feb 4, 2026
4 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.

2 participants