How to use BloomEffect to add bloom effects to a part of object

I want to develop a Class similar to addIncludedOnlyMesh in GlowLayer, but there is no threshold configuration in GlowLayer, nor is it more direct like BloomEffect configuration, like this: https://playground.babylonjs.com/#Y3C0HQ#146

But because post-processing is pixel-level, using Bloom in DefaultRenderingPipeline cannot take effect on specific objects.

Is there any way to add BloomEffect to specific objects?

I have an idea, create two cameras, control visible objects through layerMask. And create a new instance of BABYLON.BloomEffect and add it to the cameraā€™s post-process chain using the addEffect() method.
Whether it is feasible? Will it have a big impact on performance?

Maybe this PR can help in this regard?

Regarding a bloom effect per mesh:

2 Likes