this is the entire point of the glowLayer You can not really bypass it as it is renderered full screen on top of everything. I your case I would suggest to bake it in you sky texture.
What do you mean by âbake it into your sky textureâ?
You could place it in the starbox if to be seen from far away or you would need a custom shader for what you are trying to achieve.
The main question is why using this gl.addIncludedOnlyMesh(star); in your scene if you do not want the glow to bleed ?
The reason Iâm adding the glowLayer is because of the visual improvement - take the below screenshots for example:
with glowlayer
without glowlayer
Since the shipâs emissiveColor is black you can add it the glow layer with addIncludedOnlyMesh as well (or donât call addIncludedOnlyMesh at all) without making the ship glow. Then even when the ship is overlapping the star itâs mostly unaffected by the glow layerâŚ
Wow! Thanks!
@Blake,
Why are your doing imported.meshes[1]
and not 0?
I think itâs because meshes[1] is your modelâs mesh, the one that has vertices and is drawn so can be affected by glow, while meshes[0] is the root mesh that Babylon adds to convert from the gltf modelâs right-handed format to Babylonâs left-handed format by rotating and scaling it (itâs not actually drawn itself so canât glow I guess).
Thanks again!