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: Add setOutputRenderTarget() #30459

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Feb 5, 2025

Related issue: #30387 (comment)

Description

The PR introduced Renderer.setOutputRenderTarget() which is focused on screen output, making it less confusing to use RenderTargets and initial support for PostProcessing in XRManager.

@sunag sunag added this to the r174 milestone Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.12
78.22
336.12
78.22
+0 B
+0 B
WebGPU 516.99
143.53
517.38
143.74
+389 B
+209 B
WebGPU Nodes 516.45
143.43
516.84
143.63
+389 B
+201 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.17
112.09
465.17
112.09
+0 B
+0 B
WebGPU 588.99
159.73
589.27
159.82
+285 B
+92 B
WebGPU Nodes 544.35
149.29
544.64
149.38
+285 B
+90 B

@mrdoob
Copy link
Owner

mrdoob commented Feb 5, 2025

Should we call it setOutputRenderTarget()?

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 5, 2025

If the parameter is always a render target, I would adhere to the set*RenderTarget() syntax.

To clarify the name setXRTarget(): I've not use setXRRenderTarget() since the parameter is not a render target but a plain framebuffer in WebGL (it's not yet clear to me how the XR target looks like in WebGPU).

@sunag sunag changed the title WebGPURenderer: Add setOutputTarget() WebGPURenderer: Add setOutputRenderTarget() Feb 5, 2025
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.

3 participants