-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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: InstancedPoints Revision #29374
WebGPURenderer: InstancedPoints Revision #29374
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
This is a design decision. /ping @mrdoob, @gkjohnson. Should instanced points and instances sprites be separate? I believed they should be. Please read this comment carefully. |
From my understanding, InstancedPoints essentially extend the old THREE.Points API, with the new added feature of circle-like rendering. I’m fine with moving the material node changes to a new Sprite class, but it feels a bit redundant and somehow confusing as to why most of the WebGL Points will become Sprites in WebGPU and InstancedPoints basically unneeded since everything will be achievable as InstancedSprite. |
Points are sized in pixels, and are just a "fat" The two are fundamentally different. |
I don't know if there's a universal definition for points in that sense. More pragmatically it may depend on what's intending to be rendered. I've often rendered point clouds with attenuated, world-space point sizes to avoid the implicit surface becoming to sparse as you zoom in. Potree, a pretty widely used point cloud rendering library, also uses world point sizes seemingly derived from point cloud density for similar reasons ![]() What I do think is probably consistent is that points will not be rotated while sprites will be. Other than that I think the implementation between the two concepts can be almost completely shared. At some point I think the naming is mostly about usability. If a user is trying to render a point cloud they will likely be looking for a "points" renderer and if they are making a 2d game they may more likely be looking for "sprites" - even if they are almost the same implementation. |
Related issue: #29269
Description
Refactored InstancedPointsNodeMaterial:
map
,alphaTest
, and fog by propagating of the view position topositionView
, simplifying the internal logic.Fixed UV handling in InstancedPointsGeometry (when debugging the UV value was incorrect).
Added a new example
webgpu_instance_points_billboards
for behavior comparison with the existingwebgl_points_billboards
.Safeguarded the renderer from breaking when
alphaToCoverage
is used without multisampling (common when antialias is disabled)./cc @sunag @aardgoose @WestLangley
This contribution is funded by Utsubo