Encode two integers into colour values and compare them in a HLSL shader
- by Ben Slinger
I am writing a 2D point and click adventure game in Monogame, and I'd like to be able to create an image mask for every room which defines which parts of the background a character can walk behind, and at which Y value a character needs to be at for the background to be drawn above the character.
I haven't done any shader work before but after…