SuperTux / supertux

SuperTux source code
https://supertux.org
GNU General Public License v3.0
2.47k stars 472 forks source link

Replace asserts with clamping in color constructor #2993

Open MatusGuy opened 4 days ago

HybridDog commented 3 days ago

In my opinion both the assertion and the clamping are bad because values outside $[0,1]$ are physically plausible (at least if they are in linearised sRGB). Values larger than 1 correspond to brighter light and values smaller than 0 correspond to wide-gamut colours, i.e. colours outside the sRGB gamut.

What is the purpose of the replacement?

MatusGuy commented 3 days ago

Some people kept getting mad about the game aborting when a color exceeds 1 or goes under 0