I started learning Unity and Shader Graph. Right now I try to understand, how the Channel Mixer is working internally.
I put in a color R 50,G 100,B 150 and the configuration on the output-R channel is R 1,G 1,B 1
Configuration on output-G is R 0,G 1,B 0 and on output-B is R 0,G 0,B 1.
According to ChatGPT the ChannelMixer in that case is calculating the output channel like:
100% input-R (50) + 100% input-G (100) + 100% input-B (150) = 300.
Because colors can be not higher than 255, the output-R should be 255. But it is 181, which i figured out with a color picker.
I even made another shader with just the expected output color of R 255,G 100,B 150 and put two cubes besides one another.
And the colors clearly differ.
So, the assumption that the ChannelMixer just adds the colors and caps it on 255 is apparently not correct.
Can anyone explain, how it is really working?
Thanks :)