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: Add support for copying mipmap data between textures #29769

Merged
merged 7 commits into from
Oct 31, 2024

Conversation

gkjohnson
Copy link
Collaborator

Related issue: #29710 (comment)

Description

Adds support for copying data to and from mipmap levels using the copyTextureToTexture function.

  • Adds a new srcLevel argument to the function
  • Attempts to retain backwards compatibility with old signature
  • Update docs
  • Default to copying the appropriate mip map size
  • Creates "scratch" frame buffers to reuse to avoid cases where other attachments are already bound but of different scales.

cc @CodyJasonBennett

@gkjohnson gkjohnson added this to the r170 milestone Oct 30, 2024
@gkjohnson gkjohnson requested a review from Mugen87 October 30, 2024 04:53
Copy link

github-actions bot commented Oct 30, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 691.65
171.38
692.66
171.56
+1.01 kB
+174 B
WebGPU 822.12
221.9
822.12
221.9
+0 B
+0 B
WebGPU Nodes 821.63
221.78
821.63
221.78
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464
112.17
465.01
112.35
+1.01 kB
+181 B
WebGPU 542.65
146.78
542.65
146.78
+0 B
+0 B
WebGPU Nodes 498.65
136.58
498.65
136.58
+0 B
+0 B

Update deprecation comment.
@gkjohnson gkjohnson merged commit 841ca14 into mrdoob:dev Oct 31, 2024
12 checks passed
@gkjohnson gkjohnson deleted the mipmap-copy branch October 31, 2024 12:22
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