Issue with glow layer

Hi,
got some issue with using GlowLayer, for me its going through non glow materials, as they would be transparent.
Here is PG with effect, if you rotate camer so that glow element is behind sphere, glow lines will go through sphere. Here is screen for it as well

Its related to addIncludedOnlyMesh as soon as line 15 meshes.meshes.forEach(m => gl.addIncludedOnlyMesh(m)); is commented out, effect is working as expected.

Looks like some rendering order issue, will try to investigate further.

Thank you

Forgot to mention, is reproduced on both latest / stabile version.
Browser: Chrome 73.0.3683.86

same issue can be reproduced using addExcludedMesh as well

adding @sebavan

Hello, this is the entire point of those functions: prevent to be taken in account with the effect generation and use them as is so no occlusion will happen and the effect will overlap the excluded meshes.

I guess the doc is not good enough on this topic. If you have a nice english sentence for it, I ll update ASAP.

@sebavan ok, but i there any way to add glow on particular mesh only but not let go through other materials, I need to use include / exclude to not add glow on whole scene as most of my materials use emissive in some way texture/color

OK, managed to get desired effect using customEmissiveColorSelector. not sure its best approach but work for now

yup that is exactly the way to do it :slight_smile:

1 Like

Hi, I think, I am also facing the same issue, Can you please update the solution in the playground. That will be easy to understand

So this solved the issue, but I realised it made performance so much more worse.