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 Texture state tracking to NodeMaterialObserver #29421

Merged
merged 4 commits into from
Sep 16, 2024

Conversation

aardgoose
Copy link
Contributor

Related issue: #29386

A race exists where a NodeMaterialObserver captures a texture's state and the texture image is loaded/changed.
This was exposed in the webgpu_postprocessing_pixel example using WebGL.

Add an equals() method to Texture() and use this, with compensation for version changes from Texture.needsUpdate().

Copy link

github-actions bot commented Sep 16, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 686.07
169.79
686.07
169.79
+0 B
+0 B
WebGPU 832.51
223.04
832.67
223.1
+164 B
+57 B
WebGPU Nodes 832.02
222.92
832.18
222.98
+164 B
+58 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 462.42
111.53
462.42
111.53
+0 B
+0 B
WebGPU 529.98
142.77
530.14
142.82
+164 B
+58 B
WebGPU Nodes 486.64
132.63
486.8
132.68
+164 B
+54 B

src/textures/Texture.js Outdated Show resolved Hide resolved
aardgoose added 2 commits September 16, 2024 13:21
@sunag sunag added this to the r169 milestone Sep 16, 2024
@sunag sunag changed the title WebGPURenderer: add Texture state tracking to NodeMaterialMonitor WebGPURenderer: add Texture state tracking to NodeMaterialObserver Sep 16, 2024
@sunag sunag merged commit 4fd5360 into mrdoob:dev Sep 16, 2024
12 checks passed
@aardgoose aardgoose deleted the texture-tracking branch September 18, 2024 08:49
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