Bloom layers and InstancedMesh rendering order

Hi, community!

I’m implementing selective-bloom in my threejs project for my portfolio. I’ve followed this example Selective Bloom.

Here is what i’ve done so far:

Now my problem is that red cubes are always rendered on top of the darker ones.

Here’s my git

To get an idea of what I want but with the bloom on the red cubes:

Thank you for your time :slight_smile:

I tried InstancedMesh of BoxGeometry and modified MeshLambertMaterial:


Thank you for your quick response :slight_smile: