I’m trying to achieve the result of glowing from behind of an object.
The idea is to render the glowing object first (using THREE.EffectComposer()) , then to render the usual object (using render). For this purpose I used layers.
Possibly (or better to say - obviously), I don’t get how the things work.
So, could you, at least, point me to the right direction with achieving of the desired result?
@marquizzo
Yes, I see the same
But in front of that glowing red box, there should be a non-glowing box of THREE.MeshLambertMaterial() with the aqua color.
That’s how it looks, if you leave just renderer.render(scene, camera) in the render loop.
Clearing the depth buffer makes the aqua box always render on top. Rotate the scene so the aqua box should be “behind” the glowing box to see the effect. Is that the desired effect?
That makes the red box visible for both 0 and 1 layers, thus it make the scene look correctly if to rotate it to the angle when the red box should cover the aqua box.
But it’s just an example and in the real app, the scene never be rotated to look at the boxes from behind
Thank you @prisoner849, I’ve tried that example, worked as expected. But it seems to darken the original material of “non-bloomed” objects as well. Any clues to avoid this?