Issue with glow layer

#1

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

0 Likes

#2

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

0 Likes

#3

same issue can be reproduced using addExcludedMesh as well

0 Likes

#4

adding @sebavan

0 Likes

#5

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.

0 Likes

#6

@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

0 Likes

#7

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

0 Likes

#8

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

1 Like