Skip to content

Consolidate glTF PBR graph and remove GLSL override#2850

Merged
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
jstone-lucasfilm:dev_gltf_pbr
Apr 9, 2026
Merged

Consolidate glTF PBR graph and remove GLSL override#2850
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
jstone-lucasfilm:dev_gltf_pbr

Conversation

@jstone-lucasfilm
Copy link
Copy Markdown
Member

This changelist consolidates the dielectric iridescence path in the glTF PBR shading graph, and removes the hand-authored GLSL graph override that is no longer needed. The following specific changes are included:

  • Restructure the dielectric iridescence path from mix(layer(A, C), layer(B, C), w) to layer(mix(A, B, w), C), eliminating a duplicated layer node that was a workaround for earlier codegen limitations.
  • Remove the hand-authored GLSL graph override for gltf_pbr, as the PremultipliedBsdfAddRefactor pass now reproduces these optimizations automatically from the consolidated global graph.

This changelist consolidates the dielectric iridescence path in the glTF PBR shading graph, and removes the hand-authored GLSL graph override that is no longer needed.  The following specific changes are included:

- Restructure the dielectric iridescence path from `mix(layer(A, C), layer(B, C), w)` to `layer(mix(A, B, w), C)`, eliminating a duplicated layer node that was a workaround for earlier codegen limitations.
- Remove the hand-authored GLSL graph override for `gltf_pbr`, as the `PremultipliedBsdfAddRefactor` pass now reproduces these optimizations automatically from the consolidated global graph.
@jstone-lucasfilm
Copy link
Copy Markdown
Member Author

I'm attaching render comparisons of two glTF PBR example materials, before and after the current PR, demonstrating that both visuals and performance are unchanged:

glTF PBR Carpaint (Before):

GltfPbr_Carpaint_Old

glTF PBR Carpaint (After):

GltfPbr_Carpaint_New

glTF PBR Glass (Before):

GltfPbr_Glass_Old

glTF PBR Glass (After):

GltfPbr_Glass_New

@jstone-lucasfilm
Copy link
Copy Markdown
Member Author

To confirm that these changes make sense from the glTF PBR perspective, I'm additionally CC'ing @kwokcb, @bowald, and @emackey.

Copy link
Copy Markdown
Contributor

@niklasharrysson niklasharrysson left a comment

Choose a reason for hiding this comment

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

This looks good to me. Nice to get rid of that limitation!

Copy link
Copy Markdown
Contributor

@kwokcb kwokcb left a comment

Choose a reason for hiding this comment

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

This looks good to me as well.

@bowald
Copy link
Copy Markdown
Contributor

bowald commented Apr 9, 2026

Great find, looks good to me.

@jstone-lucasfilm jstone-lucasfilm merged commit e5b1831 into AcademySoftwareFoundation:main Apr 9, 2026
36 checks passed
@jstone-lucasfilm jstone-lucasfilm deleted the dev_gltf_pbr branch April 9, 2026 15:48
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.

4 participants