Skip to content

Conversation

@aardgoose
Copy link
Contributor

@aardgoose aardgoose commented May 29, 2024

Related issue: Closes #28519

Rendering using outputStruct() to multiple render targets doesn't handle depth with WGSL because @Builtin('frag_depth') not included in the output struct definition. (GLSL unaffected).

Include builtins as required and simplify, avoiding the var in main fragment shader function and aligning with standard code with the output named 'output'.

@aardgoose aardgoose changed the title WebGPURenderer: handle rendering to depth textures with multiple color attachments (MRT) WebGPURenderer: fix rendering to depth textures with multiple color attachments (MRT - WGSL) May 29, 2024
@Spiri0
Copy link
Contributor

Spiri0 commented May 29, 2024

I just tested the changes locally in my app. That works, with this changes the depthNode works in conjunction with the outputNode like with the colorNode.
Then my ticket #28519 can also be closed as solved.

@sunag sunag added this to the r165 milestone May 29, 2024
@sunag sunag merged commit 71f8579 into mrdoob:dev May 30, 2024
@aardgoose aardgoose deleted the mrt-depth branch July 17, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It seems like there is an issue with outputNode in connection with depthNode

3 participants