Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Color comparison in pixel shaders

$
0
0

@Luca_Carminati wrote:

Hello,
in pixel shaders at the moment I use the following way to check if two colors are equal:

if (color1.r == color2.r && color1.g == color2.g && color1.b == color2.b)

I wonder if there is a simple way, something like:

if (color1 == color2)

or maybe:

if (color1.rgb == color2.rgb)

Am I asking too much?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles