Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Apr 1, 2025

Related issue: -

Description

I've tried using TRAA in webgpu_postprocessing_fxaa and it turned out the AA did not work correctly. The problem is the update callbacks of VelocityNode don't get properly executed when render objects share the same node builder state. Hence, only one tetrahedron is properly anti-aliased, all others not because their motions vectors are not updated.

A refresh must be forced in the material observer when velocity rendering is active.

@Mugen87 Mugen87 requested a review from sunag April 1, 2025 14:54
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Apr 1, 2025

@sunag I'm not sure this is the best fix. Could VelocityNode be used without a MRT context?

@github-actions
Copy link

github-actions bot commented Apr 1, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.36
78.34
336.36
78.34
+0 B
+0 B
WebGPU 532.97
148.11
533.07
148.15
+103 B
+40 B
WebGPU Nodes 532.43
148.01
532.54
148.05
+103 B
+40 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.37
112.21
465.37
112.21
+0 B
+0 B
WebGPU 604.58
164.08
604.68
164.12
+103 B
+34 B
WebGPU Nodes 559.57
153.53
559.67
153.56
+103 B
+33 B

@sunag
Copy link
Collaborator

sunag commented Apr 1, 2025

@sunag I'm not sure this is the best fix. Could VelocityNode be used without a MRT context?

Let's continue like this for now, checking the MRT entry by the name velocity should be temporary, because in the future we may want to make a RenderTarget pack in order to save bandwidth, so this name will be different. I'll need to think of a better solution for this.

@sunag sunag added this to the r176 milestone Apr 1, 2025
@sunag sunag merged commit f636bf1 into mrdoob:dev Apr 1, 2025
12 checks passed
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.

2 participants