Skip to content

WebGLRenderer: Add support for copying mipmap data between textures#29769

Merged
gkjohnson merged 7 commits intomrdoob:devfrom
gkjohnson:mipmap-copy
Oct 31, 2024
Merged

WebGLRenderer: Add support for copying mipmap data between textures#29769
gkjohnson merged 7 commits intomrdoob:devfrom
gkjohnson:mipmap-copy

Conversation

@gkjohnson
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

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.
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