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

WebGLRenderer: Allow for binding and rendering into a 2d render target mipmap #29844

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

gkjohnson
Copy link
Collaborator

@gkjohnson gkjohnson commented Nov 8, 2024

Related issue: #29779

Description

Adjusts setRenderTarget to afford binding and rendering into a specific mipmap level of a 2d render target texture. A scratch frame buffer is used to avoid cases where there are other attachments on the cached framebuffer without mipmaps (ie a depth buffer) resulting in an error when drawing (which was happening with 3d render targets, as well).

  • Depth buffers & rendering into depth textures, multiple render targets are not supported.
  • Mipmaps are now no longer automatically generated when rendering into a mipmap layer.

cc @CodyJasonBennett

edit looks like this will need some different handling for multisample targets but I'm not sure what the best way is to handle that

@gkjohnson gkjohnson added this to the r171 milestone Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.22
79.04
339.4
79.07
+185 B
+35 B
WebGPU 476.91
132.18
476.91
132.18
+0 B
+0 B
WebGPU Nodes 476.2
132.01
476.2
132.01
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464.67
111.99
464.86
112.03
+185 B
+36 B
WebGPU 545.94
147.85
545.94
147.85
+0 B
+0 B
WebGPU Nodes 501.82
137.55
501.82
137.55
+0 B
+0 B

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.

1 participant