Remember what we learned about premultiplied alpha in CS148?
Well, I don’t, because I wasn’t paying attention to that at all. I was probably playing tetris during that lecture (though I’m fairly sure I did actually go to that one).
Normally you wouldn’t have to worry about any of it because XNA makes it all seem like it doesn’t exist, with the exception of text colors, which you have to use their helper function FromNonPremultiplied for. But I’m doing an HSV shader so I can have HSV modification instead of plain ol tinting when I use their draw code, so I need to unpremultiply and then repremultiply it.
YAY I UNDERSTAND SOMETHING.