Creates a new GSplatContainer instance.
The graphics device.
Maximum number of splats this container can hold.
The format descriptor with streams and read code. Use GSplatFormat.createDefaultFormat for the built-in format, or create a custom GSplatFormat.
Gets the format descriptor for this resource. The format defines texture streams and shader code for reading splat data. Use this to add extra streams.
Maximum number of splats this container can hold.
Gets the number of splats to render.
Gets the texture dimensions (width and height) used by this resource's data textures.
Protected_ProtectedActually destroys this resource and releases all GPU resources. Derived classes should override this method instead of destroy().
Destroys this resource. If the resource is still in use by the sorter, destruction is automatically deferred until it's safe.
Gets a texture by name.
The name of the texture.
The texture, or null if not found.
Updates the container after modifying texture data and centers. Call this after filling data to signal that the container contents have changed.
OptionalnumSplats: number = ...Number of splats to render. Defaults to current value. Must be between 0 and maxSplats.
OptionalcentersUpdated: boolean = trueWhether the centers array was modified. Set to false when only numSplats changes but center positions remain the same, to avoid the cost of re-cloning centers in the sorter (can be significant for large containers).
A container for procedural Gaussian Splat data. This class allows you to create splat data programmatically using either a built-in format or a custom format with your own texture streams and read code.
A default format is provided via GSplatFormat.createDefaultFormat which uses float textures for easy CPU population.
Example
Example