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

Something wrong happens with texture that passed to JSX attribute "map" of material #3246

Open
krutoo opened this issue May 1, 2024 · 1 comment

Comments

@krutoo
Copy link

krutoo commented May 1, 2024

Hi, in my project i change map of material by key press

I noticed that texture object that passed to JSX attribute "map" breaks its colors

I prepare example codesandbox:
https://codesandbox.io/p/devbox/d3rwll?migrateFrom=z6qx7z

In this sandbox when you press ArrowRight texture of plane is changed to other but based on same picture (you can see keyframes constant) - just press ArrowRight multiple times

But first and second textures are different visually

Can someone explain this behavior?

@m10
Copy link

m10 commented Aug 23, 2024

I thnk this is a color space issue.
Try texture.colorSpace = SRGBColorSpace; or maybe material.toneMapped = false;

https://codesandbox.io/p/devbox/test-of-initial-jsx-attr-map-value-of-material-forked-cd5gg5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants