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(USDZExporter): alpha issues in diffuse map #364

Merged
merged 1 commit into from
May 29, 2024

Conversation

Patrick-van-Halm-360Fabriek
Copy link
Contributor

Why

When applying a texture with a transparent background, the USDZ exporter doesn't export the transparency of the texture. In this PR it will fix it.

What

I changed the shader of the USDZ exporter to include the opacity as alpha and opacityThreshold. The applied changes are based of the Pull request in THREE,js USDZExporter: Support opacity materials. It looks like this change later was removed from the source code again. I reimplemented it in this code base with an additional step to always include an opacityThreshold of 0.01 when the material is transparent since it will show a white blur if not.

Copy link

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.

@CodyJasonBennett CodyJasonBennett changed the title fix: alpha issues in diffuse map using USDZExporter fix(USDZExporter): alpha issues in diffuse map May 29, 2024
@CodyJasonBennett CodyJasonBennett merged commit 880e2eb into pmndrs:main May 29, 2024
3 checks passed
Copy link

🎉 This PR is included in version 2.30.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.

None yet

2 participants