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

SceneOptimizer: Fix toBatchedMesh() Materials #29935

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

AlaricBaraou
Copy link
Contributor

Description

While playing with the sceneOptimizer I noticed that it didn't check for the map property when generating the mapHash, which would cause some incompatible mesh to be batched together.

Regarding the material, they were all converted to physicalMaterial, now they use the same constructor as the original material.

And lastly, regarding the color, it was both on the initial material and per instance resulting in different color than the originals.

This contribution is funded by Alaric Baraou💶

@RenaudRohlinger RenaudRohlinger added this to the r171 milestone Nov 20, 2024
@RenaudRohlinger
Copy link
Collaborator

Thanks!

@RenaudRohlinger RenaudRohlinger changed the title fix: SceneOptimizer.toBatchedMesh() SceneOptimizer: Fix toBatchedMesh() Materials Nov 20, 2024
@RenaudRohlinger RenaudRohlinger merged commit 0a868ea into mrdoob:dev Nov 20, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants