Hey, I’m just wondering what the best way would be to achieve the following:
I have an animated enemy sprite, and I wanted the eyes to be prominent and glowing while the rest of the sprite is standard diffuse.
My initial thoughts of how I might achieve this:
Method 1:
Two point lights, manually script different Vector2 positions to have the lights parent object TransformMove through. Seems easiest in terms of time to setup but probably least performant.
Method 2:
Create a separate animation of just the eyes, playing in sync and over-top of the base enemy. This way I can change the shader of the eyes as needed, seems like the best way to go, though some syncing issues may crop up.
Method :
Changing the sprites Eyes to a color not used, like hot-hot pink, and using something like the All-In-1-Sprite-Shader to select the color, and replace shader on this new selection - this one, I have no idea if it’s possible or sensible, just a thought that occurred to me to think of.
To add to kdgalla’s answer: if you don’t want to use bloom post-processing just for the eyes, a couple quads with additive blending will work wonders. Similar to your point lights idea, minus the cost of actual point lights.
Totally - but how would one “target” the bloom to just the eyes, for example, of an animated sprite? I’d have to assume this is Method 2. Roundabout way to answer the original question! Just looking to see any different implementations that may exist.
It’s impossible to target a specific object with bloom since it is a post-effect. If you want the eyes to be only thing glowing, then you have to adjust the brightness off the emissive color of the eyes and the threshold of the bloom so that the eyes are the only thing above the threshold.
You might also consider going with arkano22’s first suggestion of using additive blending. There should be a built-in particle shader that does this. You would just have to make the texture yourself.