-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Material: Remove obsolete callbacks. #28702
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Hello Mugen87, |
Why can't you use |
It could be possible. |
Yeah this change broke some stuff for me too, and the workaround is a bit inconvenient... We have a post processing pass where there is an overrideMaterial on the scene. Material.onBeforeRender was setting a uniform (incrementing a counter to render each object with a distinct color). I'm trying to think about how to best workaround this now. |
This reverts commit 5557d53.
This reverts commit 5557d53.
This reverts commit 5557d53.
This change broke the light probe work going on in this thread, since the extension being worked on relies upon onBeforeRender to manage the uniform updates for the irradiance probes, etc. |
Yes can we PLEASE revert this change? having a material callback is super useful! |
DOPPLE: Re-restore onBeforeRender on materials, to fix probes. This reverts commit 5557d53.
If we add
There seems to be no use case for |
This reverts commit 5557d53.
This reverts commit 5557d53.
Related issue: -
Description
Material.onBuild()
andMaterial.onBeforeRender()
were undocumented methods and only relevant for the former node material integration inWebGLRenderer
. Now that the integration has been removed, it's probably best to remove these callbacks as well.