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: Improve PointsNodeMaterial #30300

Merged
merged 9 commits into from
Jan 10, 2025
Merged

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jan 9, 2025

Related issue: #30254, #29659 (comment)

Description

This PR introduces improvements to PointsNodeMaterial which is now extended from SpriteNodeMaterial therefore brings additional resources. It is also the successor of InstancedPointsNodeMaterial, and resolves issues related to logarithmic depth.

I also separated the circle into a shape, so that users can use different types of shapes in PointsNodeMaterial.

The main motivation is to avoid "duplicate code" and facilitate maintenance.

image

Copy link

github-actions bot commented Jan 9, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.51
79.09
339.51
79.09
+0 B
+0 B
WebGPU 491
136.35
490.73
136.38
-273 B
+33 B
WebGPU Nodes 490.46
136.24
490.19
136.27
-273 B
+35 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.35
112.14
465.35
112.14
+0 B
+0 B
WebGPU 560.3
151.75
561.25
152.06
+949 B
+314 B
WebGPU Nodes 516.39
141.54
516.63
141.65
+240 B
+111 B

@sunag sunag added this to the r173 milestone Jan 9, 2025
@sunag sunag marked this pull request as ready for review January 10, 2025 14:06
@sunag sunag merged commit 81a3069 into mrdoob:dev Jan 10, 2025
12 checks passed
@sunag sunag deleted the dev-sprites-2 branch January 10, 2025 14:09
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.

1 participant