Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USDZLoader: Fix geometry and material parsing. #28647

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jun 13, 2024

Related issue: -

Description

This PR adds two fixes. It ensures buildMaterial() does not always use the name PreviewSurface to select the surface shader but uses the real name from the connection definition. Besides, it rearranges index processing in buildGeometry() to fix normal generation with assets exported from USDZExporter.

@@ -675,24 +687,6 @@ class USDZLoader extends Loader {

}

if ( 'def Shader "diffuseColor_texture"' in data ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These hardcoded shader evaluations were required since the actual shader had a different name than PreviewSurface and thus was not found.

@Mugen87 Mugen87 added this to the r166 milestone Jun 13, 2024
@Mugen87 Mugen87 merged commit 1485992 into mrdoob:dev Jun 13, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant