Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace asserts with clamping in color constructor #2993

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MatusGuy
Copy link
Member

@MatusGuy MatusGuy commented Jul 3, 2024

No description provided.

@MatusGuy MatusGuy added priority:low category:code status:needs-review Work needs to be reviewed by other people labels Jul 3, 2024
@HybridDog
Copy link
Contributor

HybridDog commented Jul 3, 2024

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
Copy link
Member Author

MatusGuy commented Jul 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:code priority:low status:needs-review Work needs to be reviewed by other people
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants