Skip to content

Unify environment light texture handling in MaterialXRenderMsl#2870

Open
warrenm wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
metal-by-example:indirect-lighting-msl-2851
Open

Unify environment light texture handling in MaterialXRenderMsl#2870
warrenm wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
metal-by-example:indirect-lighting-msl-2851

Conversation

@warrenm
Copy link
Copy Markdown
Contributor

@warrenm warrenm commented Apr 20, 2026

This PR seeks to address #2851.

The core issue is that the Metal rendering code wasn't honoring the indirect lighting property of the light handler. However, changing the logic to match that of the implementation in bindLighting() in GlslProgram isn't quite enough. There were actually two independent paths for binding IBL textures in the Metal implementation, one in bindLighting() and one in the lower-level bindTextures(). This change unifies those two paths into a single path relying on the explicit bound texture mechanism currently used for shadow mapping.

This change seems fairly natural to me, but I would appreciate any other Metal renderer implementation experts weighing in.

Tested in MaterialXView on macOS Tahoe 26.4:

fix.mov

@warrenm warrenm marked this pull request as ready for review April 20, 2026 23:09
@warrenm warrenm force-pushed the indirect-lighting-msl-2851 branch from 152a546 to e371b74 Compare April 20, 2026 23:09
@warrenm warrenm force-pushed the indirect-lighting-msl-2851 branch from e371b74 to 0293504 Compare April 20, 2026 23:22
@jstone-lucasfilm
Copy link
Copy Markdown
Member

This looks like a great improvement to me, @warrenm, and I'm CC'ing @lkerley and @dgovil for their thoughts and feedback.

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