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

Clipping is not correct when material enables transparent and spot-light casts shadow [WebGPU] #28267

Closed
Cerberus opened this issue May 3, 2024 · 1 comment
Labels
Milestone

Comments

@Cerberus
Copy link
Sponsor

Cerberus commented May 3, 2024

Description

Current behavior

Clipping an geometry with material additive-blending..
Mesh without set transparent ✅
mesh-no-transparent
Spot-light without casting shadow ✅
spotlight-no-shadow
Enable transparent & cast-shadow ❌
enable both

Expected behavior

Clipping correctly with both configs.


Another approach

I've tried to set opacity and alphaToCoverage on mesh instead and it works. However this way does not allow to use blending: THREE.AdditiveBlending.

Reproduction steps

Try in demo link and orbit around the object to see clipping behavior.

Code

The clipping behavior is not correct when enable..

spotLight.castShadow = true // spotLight
transparent: true // mesh

Live example

https://stackblitz.com/edit/stackblitz-starters-tezjmh?file=index.html

Screenshots

No response

Version

0.164.1

Device

Desktop

Browser

Chrome

OS

MacOS

@Mugen87 Mugen87 added the WebGPU label May 3, 2024
@aardgoose
Copy link
Contributor

I have a fix for this, and will push a PR soon.

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

No branches or pull requests

3 participants