-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
MeshPhongMaterial: Assign color space of default specular value #25872
MeshPhongMaterial: Assign color space of default specular value #25872
Conversation
@@ -58,6 +58,7 @@ | |||
|
|||
const material = new THREE.MeshPhongMaterial( { | |||
color: 0xff0000, | |||
specular: 0x111111, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this when updating the example earlier in 3b5cbe0. Further changes to lighting would restore the original appearance too, but it was much easier just to keep the specular value, and has little bearing on the example.
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Hm, let me take a closer look at this. I'm not sure why this PR breaks the |
It seems best to skip this change. I'm still a bit confused about why, but perhaps we should think of Phong's |
They are both unit-less, and they are both colors. I don't think it would make sense from a physical modeling standpoint for the two colors to be associated with different color spaces -- or for one to be a color, and the other not. |
@WestLangley I agree that we cannot consider the two to be associated with different color spaces in the renderer. I believe we are agreed that this PR can remain closed, then, even if my speculative reasons in #25872 (comment) are incorrect? |
@donmccurdy Yes, I think this PR should remain closed. |
Assigns a color space for the default specular value, to ensure that it behaves the same way with or without THREE.ColorManagement. Without color management, all inputs are assumed to be Linear-sRGB. With color management, hexadecimal colors are considered sRGB, so we need to specify exceptions.
Related issue: