Given that I want to have an enemy with health, and as the health percentage gets lower the enemy changes color to a more red version. I understand how to set a color in a shader, but how is it supposed to work if functions can't access variables!
Any examples or links would be great!
1) Enemy flashes red when hit and color turns back to main color.
2) Enemy color darkens the more damage taken.