I’ve been following this selective bloom example on GitHub to create a glow effect around the sun. However, I was not able to actually see the sun object (it only gave off sunlight) so I used
object.layers.set(1) instead of
object.layers.enable(1) and managed to get it working.
Weirdly, (at least, to me) I noticed that the other objects in the scene were visible through the sun as if it was translucent. This can be seen on codepen.
Here’s a screenshot:
If you look closely you can see the Earth (through the Sun). I’m not sure why this is the case.
I’ve scaled up the Earth so the problem is more noticeable:
For the sun, setting
sphere.layers.enable(1) as opposed to
sphere.layers.set(1) fixes this issue but the sun ends up looking like this:
I guess using
enable is the way to go so I suppose my question is really about lighting then …