Skip to content

Fix prefilter env tangent-frame seam and add mx_isinf wrapper - #3023

Merged
jstone-lucasfilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
autodesk-forks:bhata/prefilter-env-seam-and-mx-isinf
Aug 11, 2026
Merged

Fix prefilter env tangent-frame seam and add mx_isinf wrapper#3023
jstone-lucasfilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
autodesk-forks:bhata/prefilter-env-seam-and-mx-isinf

Conversation

@ashwinbhat

@ashwinbhat ashwinbhat commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Fixes a tangent-frame seam in mx_generate_prefilter_env by building the frame from the latlong parameterization instead of calling mx_orthonormal_basis, which flips discontinuously where N.z crosses zero at longitude ±90°.

Also adds an mx_isinf wrapper to the GLSL/MSL/Slang math libraries and updates mx_chiang_hair_bsdf.glsl to use it. This is required because wgsl does not support it.

Validated with before/after GLSL renders using --envMethod 1 (prefiltered environment maps).
mx_orthonormal_basis_comparison.html.pdf

Fixes a tangent-frame seam in mx_generate_prefilter_env by building the frame from the latlong parameterization instead of calling mx_orthonormal_basis, which flips discontinuously where N.z crosses zero at longitude ±90°.

Also adds an mx_isinf wrapper to the GLSL/MSL/Slang math libraries and updates mx_chiang_hair_bsdf.glsl to use it. This is requried because wgsl does not support it.

Validated with before/after GLSL renders using --envMethod 1 (prefiltered environment maps).

@jstone-lucasfilm jstone-lucasfilm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for these improvements, @ashwinbhat!

@jstone-lucasfilm
jstone-lucasfilm merged commit a7b2d60 into AcademySoftwareFoundation:main Aug 11, 2026
70 of 71 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