SplatDrawPass class
Renders Gaussian splats using depth-sorted order and instanced drawing.
- Inheritance
-
- Object
- RenderPass
- SplatDrawPass
Constructors
- SplatDrawPass.new({required SplatSource source, required OrderTexture order, bool disableAlphaWrite = true, double maxSplatPixelSize = 1024.0, String vsAsset = 'packages/flutter_gaussian_splatter/shaders/vertex.glsl', String fsAsset = 'packages/flutter_gaussian_splatter/shaders/frag.glsl'})
- Creates a splat drawing pass with the given source data and order texture.
Properties
- disableAlphaWrite ↔ bool
-
Saves GPU memory bandwidth by preventing writes to the alpha channel of
the framebuffer.
Benefit: Reduces GPU memory bandwidth by ~25%
(writing 3 channels instead of 4)
Cost: Can't composite the rendered texture with other elements using its
alpha channel (needed to blend with Flutter UI)
getter/setter pair
- fsAsset → String
-
Asset path to the fragment shader.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxSplatPixelSize → double
-
Maximum allowed splat size in pixels before culling.
final
- name → String
-
Stable, human-readable name for logs/profiling.
no setteroverride
- order → OrderTexture
-
Texture containing depth-sorted splat indices.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → SplatSource
-
Source of Gaussian splat data and textures.
final
- vsAsset → String
-
Asset path to the vertex shader.
final
Methods
-
dispose(
RenderingContext gl) → void -
Free GL resources. Safe to call multiple times.
override
-
execute(
RenderingContext gl, Camera cam, {Matrix4? projectionMatrix, Matrix4? viewMatrix}) → void -
Record commands and draw.
override
-
init(
RenderingContext gl, {Caps? caps}) → Future< void> -
Create GL objects, compile shaders, cache uniform locations.
override
-
injectAfterVersion(
String src, String defineLine) → String - Injects a shader define after the #version directive.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onSourceChanged(
) → void - Call when splat count changes.
-
resize(
RenderingContext gl, int width, int height) → void -
Resize/retarget any size-dependent resources (if any).
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited