Hi guys! @nathanidp … I did some glowLayer work with linesMesh… https://www.babylonjs-playground.com/#258JTK#13 (caution, extreme color flashing). This all MIGHT BE off-topic, but maybe not.
Code-lines 26, 30, 34, 38, 47… all the linesMesh are pushed into an array called lines.
Line 49… I establish the glow layer, and line 52… I use a handy glowLayer custom-function feature called customEmissiveColorSelector. I think it runs every render-frame… and it can be used to determine which lines-mesh get which glow-colors (and thus, MAYBE it can determine which lines-mesh get NO glow-color [color set to null?], or maybe which get glowColor matching background color).
Note: Lines 68-70 are in-active in that custom func… unless you create/push one more lines-mesh.
Another note: Line 77 turns-on showBoundingBox for linesMesh #1. It also glows white, its default color, and forms the white box around linesMesh #1 (screen center). Notice there is no WHITE conditional in the customEmissiveColorSelector function. THIS glowLayer tries to glow-ify everything in the scene… unless you tell it NOT to.
I think we can prove that it runs every frame… by disabling/activating line 90. That will “rotate-shift” the lines array every 1/10 second.
GlowLayers are similar to highlightLayers… as far as alpha-blending/transparencies (what Evgeni and you are speaking-about). Get them too near-to half-transparent things, and they become unpredictable, depth-sorting-wise. I’m no expert. I just wanted to show you glowLayer’s customEmissiveColorSelector function… in case it was useful for you. Party on!
Comment about next post… EP, thx for checking dashed-lines… I should have done that so you didn’t have-to. Sorry. Well done.