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

fix(MeshTransmissionMaterial): unset USE_ANISOTROPY, add compat alias #1483

Conversation

CodyJasonBennett
Copy link
Member

Fixes #1482 where new USE_ANISOTROPY chunks break with the custom anisotropy prop (now reserved) and adds back the prop removed in 549493d.

@vercel
Copy link

vercel bot commented Jun 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2023 11:12am

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 1, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1b9ad59:

Sandbox Source
magical-platform-tem8zm Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration

Comment on lines 124 to 130
// r153+ compat https://github.com/pmndrs/drei/issues/1482
shader.defines = { ...shader.defines }
Object.defineProperty(shader.defines, 'USE_ANISOTROPY', {
get() {},
set(_) {},
})

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the "proper" fix, but aliasing anisotropy to anisotropicBlur on the material also works. Removing this one.

@CodyJasonBennett CodyJasonBennett merged commit ecea3a1 into pmndrs:master Jun 1, 2023
5 checks passed
@CodyJasonBennett CodyJasonBennett deleted the fix/mesh-transmission-anisotropy branch June 1, 2023 11:15
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

🎉 This PR is included in version 9.70.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

MeshTransmissionMaterial breaking on three.js r153 when playing with clearcoat or anisotropy
1 participant