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

GLTFLoader: Properly set defines for GLTFMeshStandardSGMaterial #20242

Merged
merged 1 commit into from
Sep 6, 2020

Conversation

WestLangley
Copy link
Collaborator

@WestLangley WestLangley commented Sep 2, 2020

For non-built-in materials, the app must set the defines, because the renderer does not do it.

(Sorry, there is considerable clean-up here. I typically keep that separate... The significant changes in this PR are to specularMap.set() and glossinessMap.set().)

/ping @donmccurdy

@WestLangley WestLangley added this to the r121 milestone Sep 2, 2020
@WestLangley
Copy link
Collaborator Author

@donmccurdy Please have a look. I would like to see this merged.

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

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

Thank you!

} else {

delete this.defines.USE_GLOSSINESSMAP;
delete this.defines.USE_UV;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe I'm misreading, but will this unset USE_UV when .glossinessMap is removed, even if other textures still need it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is fine. What is being set here are so-called "custom defines" -- a separate list.

@mrdoob mrdoob merged commit ce1ea66 into mrdoob:dev Sep 6, 2020
@mrdoob
Copy link
Owner

mrdoob commented Sep 6, 2020

Thanks!

@WestLangley WestLangley deleted the dev_gltf_loader_defines branch September 6, 2020 16:05
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.

None yet

3 participants