Modifying the Glow Layer to support a Texture Atlas mesh setup

@sebavan I believe you are the godfather of the Glow Layer so tagging you :slight_smile:

I’m wondering if there is a way to modify the glow layer to work with a texture atlas instanced mesh setup, i.e. if I have meshes with transparency data in an atlas, the instanced mesh will show the entire atlas glowing if I attempt to use the glow layer. If that is confusing, it’s obvious from playground:

(Ignore all the color stuff, if you look at the first number you’ll see what I am trying to do).

I know I’d need to pass in the cellInfo and options attributes like I’m doing on the atlas shader (and modify the vUV accordingly), but I’m not sure which of the glow layer shaders I would need to modify, and also will the glow layer be able to read the attributes I declared with registerInstancedBuffer? (if it’s possible theoretically, I’m good with overriding the glow layer shaders to only work with my texture atlas instanced meshes).

Maybe you could try to use the mesh material directly with the new referenceMeshToUseItsOwnMaterial ???

This seems to be EXACTLY what I’ve been missing from the glow layer, and solves this issue as well, thank you!

1 Like