PointsNodeMaterial
A node material for point sprites and particle systems. It works with Points or Sprites: under WebGPU, true point primitives rendered via Points have a fixed size of 1 pixel; to control pixel size use Sprites (honors `sizeNode`). Sprites always face the camera. This is the node-based counterpart of PointsMaterial.
Core Advantages
Scales efficiently to large particle counts, with per‑point control of size (`sizeNode`) and rotation (`rotationNode`). Built‑in `sizeAttenuation` for perspective falloff and optional `alphaToCoverage` for smoother alpha edges.
Common Uses
Fire, smoke, rain, snow, explosions
Starfields and galaxies
3D point‑cloud data visualization
Sprite‑based foliage or debris
How to adjust
Use `size` for the base pixel size and `sizeAttenuation` for distance falloff. Use `sizeNode` for per‑point sizing (e.g., driven by vertex attributes or noise). Use `rotationNode` to rotate each sprite. Use `map`/`alphaMap` for color and transparency, and enable `alphaToCoverage` for smoother edges. Note: in WebGPU with `<points>`, `size` is fixed to 1; for adjustable size, switch to `<sprite>` with instancing and provide a `positionNode`.
Code Examples
1<points>
2 <sphereGeometry args={[1, 64, 32]} />
3 {/* On WebGL, size works on <points>; on WebGPU, point size is fixed to 1.
4 To control size on WebGPU, switch to <sprite> with instancing or use sizeNode. */}
5 <pointsNodeMaterial
6 color="aquamarine"
7 size={15}
8 sizeAttenuation={true}
9 alphaToCoverage={true}
10 />
11</points>