Some help understanding and modifying a 2D shader

Posted by electroflame on Game Development See other posts from Game Development or by electroflame
Published on 2011-11-30T22:40:06Z Indexed on 2011/12/01 2:22 UTC
Read the original article Hit count: 240

Filed under:
|
|
|
|

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.

© Game Development or respective owner

Related posts about XNA

Related posts about 2d