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

feat: Allow re-use of existing materials #15

Closed
hmans opened this issue Jun 8, 2022 · 2 comments
Closed

feat: Allow re-use of existing materials #15

hmans opened this issue Jun 8, 2022 · 2 comments

Comments

@hmans
Copy link
Owner

hmans commented Jun 8, 2022

As of now, the materials for particles are always created from scratch (using <ParticlesMaterial>, which uses three-custom-shader-material to patch our shader code into newly created instances of Three's built-in materials.)

Ideally, we'd be able to patch existing materials. This is important for eg. using materials imported from a GLTF file.

This probably requires a PR to three-custom-shader-material in order for it to accept existing instances of materials.

@hmans hmans mentioned this issue Jun 8, 2022
@hmans
Copy link
Owner Author

hmans commented Jun 9, 2022

An upcoming release of three-custom-shader-material will allow us to reuse existing materials, which pretty much auto-fixes this issue.

@hmans
Copy link
Owner Author

hmans commented Jun 12, 2022

This now works, thanks to three-CSM 3.4.0.

@hmans hmans closed this as completed Jun 12, 2022
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

No branches or pull requests

1 participant