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

WebGPURenderer: fix rendering to depth textures with multiple color attachments (MRT - WGSL) #28523

Merged
merged 2 commits into from
May 30, 2024

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) 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
11 checks passed
@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
3 participants