Some help understanding and modifying a 2D shader
- by electroflame
I have a similar question as the one posed here, except that I don't wish to use a 1D Color Palette.
I simply wish to have it display 1 color of my choosing (red, for example). I plan to use this as a "shield" effect for a 2D ship.
I also wish to understand how it works a little bit better, as I'll be the first to admit that shaders in general are not my strongest suit. I'm not asking for an overview of HLSL (as that is too broad of a subject), just an explanation of how this shader works, and the best way to implement it in a 2D game.
Code examples would be ideal (even if they are theoretical) but if the answer is explained well enough, I might be able to manage with plain old text.
This is also in XNA 4.0.
Thanks in advance.