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

[Solved]How to sum r+g+b values and convert it to int in the shader?

$
0
0

@Peon501 wrote:

How to sum r+g+b values and convert it to int in the shader?
I think I start to have problems from 255.
Any Ideas?
Fixed this by changing the type of color to Rgba64.

The default is Color
Which is 32 bit and 8 bits per channel
If you use Rgba64, it'll be 64 bit and 16 bits per channel
So instead of 256 colors, it'll be 65535 colors.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles