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

With WebGPU, DirectionalLight + castShadows crashes #26830

Closed
verekia opened this issue Sep 24, 2023 · 2 comments · Fixed by #26838
Closed

With WebGPU, DirectionalLight + castShadows crashes #26830

verekia opened this issue Sep 24, 2023 · 2 comments · Fixed by #26838
Assignees
Labels

Comments

@verekia
Copy link

verekia commented Sep 24, 2023

Description

With WebGPURenderer, DirectionalLight works fine but not with castShadows enabled.

Reproduction steps

It crashes on this line of TextureNode.js.

TextureNode.js:52 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'channel')
    at Proxy.getDefaultUV (TextureNode.js:52:12)
    at Proxy.construct (TextureNode.js:87:1)
    getDefaultUV() {

        return uv( this.value.channel ); ❌

    }

Code

See reproduction repo

Live example

I could not reproduce the bug in a live playground due to the top-level await of WebGPURenderer, sorry.

Here is a minimal reproduction repo: https://github.com/verekia/r3f-webgpu/tree/three-direction-light

Branch three-direction-light

Screenshots

Screenshot 2023-09-24 at 13 32 01

Version

r0.156.1

Device

Desktop

Browser

Chrome

OS

MacOS

@CodyJasonBennett
Copy link
Contributor

Vanilla reproduction: https://jsfiddle.net/joekm4n2. Narrowed it to the use of a textured material combined with shadow maps.

image

@sunag
Copy link
Collaborator

sunag commented Sep 25, 2023

Thanks for making it easy to reproduce the error. Regarding the example in r3f, I think that for benchmark purposes r157 brings some important improvements and others we are developing here.

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 a pull request may close this issue.

4 participants