Skip to content

fix: resolve triangle artifacts by fixing normalView TSL variable ini…#1276

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-triangle-artifacts-Yghw8
Feb 3, 2026
Merged

fix: resolve triangle artifacts by fixing normalView TSL variable ini…#1276
braedonsaunders merged 1 commit into
mainfrom
claude/fix-triangle-artifacts-Yghw8

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

…tialization

The root cause was Three.js GitHub issue #32009 - TSL's normalView variable may not be properly initialized in MRT shader contexts, causing black/undefined normals for some pixels. When GTAO receives zero normals, it falls back to depth-based normal reconstruction which creates visible triangular artifacts.

Using .toVar() forces proper variable initialization in the shader, ensuring all pixels have valid normals in the MRT output.

https://claude.ai/code/session_012kqvccEiiHNQHAjUEoposi

…tialization

The root cause was Three.js GitHub issue #32009 - TSL's normalView variable
may not be properly initialized in MRT shader contexts, causing black/undefined
normals for some pixels. When GTAO receives zero normals, it falls back to
depth-based normal reconstruction which creates visible triangular artifacts.

Using .toVar() forces proper variable initialization in the shader, ensuring
all pixels have valid normals in the MRT output.

https://claude.ai/code/session_012kqvccEiiHNQHAjUEoposi
@braedonsaunders braedonsaunders merged commit 6037863 into main Feb 3, 2026
2 of 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