It looks like you're new here. If you want to get involved, click one of these buttons!
Pretty nice looking tutorial. Good job!
Really nice tutorial, congrats!
So the best option is to always control the rendering order, either by using Z coordinates or explicit object groups: it won't make a difference in simple examples, however it might prevent some headaches in more complex setup with intermittent "visual glitches".
Bonus option: one could create the negative texture on the fly when a tagged "glow" texture gets loaded. It's of course a trade off between execution speed and offline pre-work and it's up to users to pick their own depending on their use case, but it might maybe be interesting to mention that such an option is available.
Wow, I think this is very important. Probably not very essential to what the tutorial is describing, but very important nevertheless.
Maybe I don't understand how to use object groups correctly,but I feel that they don't play nicely with objects that are supposed to be in the same "scene". I mean it's clearly perfect to separate game objects vs. GUI components, but you can't really use them to order game objects among each other, can you?
For instance, in the specific example of this tutorial, I have two objects with a definite order, so I could try to put the additive element into an "additive" object group, and likewise for the multiplicative. Then I could specify their order in the camera section. But what would happen if two glowing balls overlapped? The drawing orders of their respective additive and multiplicative components will then probably be: Multiplicative1 -> Multiplicative2 -> Additive1 -> Additive2, and the result of this order will be different from the correct order, which is: Multiplicative1 -> Additive1 -> Multiplicative2 -> Additive2.
GroupList = Background # Glowing Ball
FrustumFar = 1
Group = Background
Position = (0, 0, 0.1)
Group = Glowing Ball
Position = (0, 0, 1.0)
So I guess the only choice is to use the Z distance. What's your recommendation on that? should I separate the additive and multiplicative components using a small, arbitrary distance like 0.0001, and hope nothing comes in between?
You're right, I should probably mention that. I've omitted it for simplicity, but a sentence wouldn't hurt. I was actually also thinking about maybe using the exact same texture but with a custom shader that does the negation. That would simplify the code, and might not add much overhead, since the regular texture is also applied with a shader anyway.