-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
ColorManagement: renamed .legacyMode
to .enabled
#24700
Conversation
@gkjohnson and I had discussed this as well... The semantic issue is that color management (as a concept, not THREE.ColorManagement) includes more than just handling input colors, which is all the flag currently does. "Disabling color management" does not disable renderer output encoding, for example. Maybe that is not confusing though? If you think of it not as a toggle on all color management, but as a toggle on the things that THREE.ColorManagement does. I am happy with the change. 👍 |
We should accept /cc @drcmda FYI |
No worries. We can work around it fine there. |
If everyone wants to change this I won't strongly fight it but I think it's worth making sure the whole picture is known. Currently setting "legacyMode = true" (what is being suggested to be changed to "ColorManagement.enabled = false") is not truly unmanaged color - it has just been mistakenly referred to as such. So to that end I would consider it incorrect to change the current nomenclature to "enabled". At some point what we're calling "legacy mode" should be removed from the project. And it should be decided if we really plan to support actual unmanaged color workflows which would basically just mean ignoring all "encoding" fields throughout the renderer. I still don't see a lot of value in that. And with the recent change to use SRGB conversion on texture upload with the WebGL API the question of performance implication is less relevant, I think. |
the most important for us is that color management is switched on. like @donmccurdy mentioned, we have this on for a longer while and it works great! but since it's opt in atm there are unavoidable bugs that are only fixed if it's the default. the amount of churn is still a burden, since we have to take
but seeing the if in the end, for whatever reason, it is not changed to "true" then please let us not change the name, because that would create churn for nothing. |
What version is that? |
To clarify for others, "unavoidable bugs" refers to the fact that R3F cannot always execute // root.js
import { ... } from './a.js';
import { ... } from './b.js'; // a.js
import { Color } from 'three';
const DEFAULT_COLOR = new THREE.Color(0x404040); // CM.legacyMode is still true // b.js
import { ... } from '@react-three/fiber'; // sets CM.legacyMode to false So the https://codesandbox.io/s/red-grass-60xi6p @drcmda I think that @WestLangley is hoping to improve the API, this does not have to be a breaking change for R3F. As proposed above, we could continue accepting None of our official examples use
By "legacy mode" we are talking about ignoring the I'd be glad to see
Nope, let's not do that! 🙅🏻♂️ I'm still unsure of what to recommended for unlit work, but ignoring |
OK. Waited until after the release to add the milestone. :-) |
I think it is better to keep the name as it is? Per @gkjohnson's reasons. |
Closing, then... |
Would you feel more comfortable using |
Yes, I would prefer merging this PR. |
Ok! Continued in #24940. |
The current API is as follows:
This PR changes the API to: