DriftCapture · interface
GaussianSet
Where a Gaussian lands on screen: the projection @driftengine/splats' shader performs, in
JavaScript, and the order a frame draws them in.
Explained in DriftCapture.
interface GaussianSetimport type { GaussianSet } from '@driftengine/capture';In depth
The same model, in the capture's own frame. A perspective divide is not linear, so a
three-dimensional Gaussian does not project to a two-dimensional one; the standard treatment,
which that shader uses and this repeats, linearises about the splat's centre — Σ' = J·R·Σ·Rᵀ·Jᵀ
— and adds a low-pass of 0.3 to the screen variances so that a splat smaller than a pixel still
covers one. The one difference is handedness: the shader works in the renderer's view space,
where z runs away from the camera negatively, and a capture's cameras look down positive z. The
arithmetic is the same and the frame is the caller's.
It exists to be differentiated. projectGradient.ts is this chain run backwards, and
gradients.test.ts holds the two together by a central difference of one against the other.
Properties
| Name | Type | Description |
|---|---|---|
count | number | |
positionsreadonly | Float64Array | Three per Gaussian, in the capture's world. |
scalesreadonly | Float64Array | Three per Gaussian: a standard deviation along each of its own axes, in metres. |
rotationsreadonly | Float64Array | Four per Gaussian, xyzw, as the engine's quaternions are. |
colorsreadonly | Float64Array | Three per Gaussian, linear, which is a spherical harmonic's constant term. |
sh1readonlyoptional | Float64Array | Nine per Gaussian for the degree-1 band, or absent for a cloud with no view dependence. |
opacitiesreadonly | Float64Array | One per Gaussian, 0 to 1. |