i use lib for load tileset that add a lot of meshes on scene dynamically. what i want is to write a shader that for example highlight area based on uniform values(coords of bbox). i tries to use onBeforeCompile added on every loaded mesh runtime with my shader and it’s kinda work but maybe there is a better approach.
As i understand EffectComposer dont help with it, cause highlight boundaries i pass as world space coords.
I like your approach. ![]()
There’s also scene.overrideMaterial that you can use to render a bunch of things w the same material .. but your method sounds more efficient.