Skip to content

With WebGPU, DirectionalLight + castShadows crashes #26830

@verekia

Description

@verekia

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions