Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Sep 13, 2025

Fixed #31886.

Description

The PR makes sure sampler data (that includes minFilter, magFilter, wrapS/T/R, anisotropy and compareFunction) can be changed after the initial use of the texture like in WebGLRenderer. In WebGPURenderer, that did work for the WebGL backend but not for the WebGPU one so far.

To implement this, the PR decouples the sampler management from textures. Previously, samplers were created per texture which is not the way they should be used in WebGPU. Samplers can be shared across different textures if their configuration matches. The related caching/creation management is implemented in WebGPUTextureUtils.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.24
79.14
338.24
79.14
+0 B
+0 B
WebGPU 580.82
160.43
581.38
160.59
+562 B
+169 B
WebGPU Nodes 579.43
160.18
579.99
160.35
+562 B
+168 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.7
113.74
469.7
113.74
+0 B
+0 B
WebGPU 650.35
175.97
650.91
176.15
+562 B
+187 B
WebGPU Nodes 604.47
165.15
605.03
165.31
+562 B
+162 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.

Texture settings stay fixed in WebGPU, but were previously mutable
1 participant