Class GaussianSplattingDebugMaterialPlugin
Hierarchy (View Summary)
- MaterialPluginBase
- GaussianSplattingDebugMaterialPlugin
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
new GaussianSplattingDebugMaterialPlugin(
material: GaussianSplattingMaterial,
): GaussianSplattingDebugMaterialPluginCreates a new GaussianSplattingDebugMaterialPlugin.
Parameters
- material: GaussianSplattingMaterial
The GaussianSplattingMaterial to attach the plugin to.
Returns GaussianSplattingDebugMaterialPlugin
- material: GaussianSplattingMaterial
Properties
do Not Serialize
Specifies if the material plugin should be serialized, true to skip serialization
Readonlymark All Defines As Dirty
Helper function to mark defines as being dirty.
name
Defines the name of the plugin
priority
Defines the priority of the plugin. Lower numbers run first.
register For Extra Events
Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)
resolve Includes
Indicates that any #include directive in the plugin code must be replaced by the corresponding code.
Accessors
clipping Box
opacity Culling
opacity Saturate
-
get opacitySaturate(): boolean
When true, replaces the Gaussian spatial falloff with a flat uniform opacity, making each splat appear as a solid disk with its raw alpha value.
Returns boolean
-
set opacitySaturate(value: boolean): void
Parameters
- value: boolean
Returns void
opacity Scale
-
get opacityScale(): number
Scalar multiplier applied to every splat's opacity after all other modifiers. 1.0 (default) = no change.
Returns number
-
set opacityScale(value: number): void
Parameters
- value: number
Returns void
part Count
-
get partCount(): number
Number of parts in compound mode. Set automatically by GaussianSplattingDebugger.addMesh(). When 0 (non-compound), setPartOptions() logs an error.
Returns number
the part count
-
set partCount(count: number): void
Parameters
- count: number
Returns void
sh Dc
-
get shDc(): boolean
Include the DC (base) color from colorsTexture. Default: true.
Returns boolean
-
set shDc(value: boolean): void
Parameters
- value: boolean
Returns void
sh Order1
-
get shOrder1(): boolean
Include SH band 1 contribution. Default: true.
Returns boolean
-
set shOrder1(value: boolean): void
Parameters
- value: boolean
Returns void
sh Order2
-
get shOrder2(): boolean
Include SH band 2 contribution. Default: true.
Returns boolean
-
set shOrder2(value: boolean): void
Parameters
- value: boolean
Returns void
sh Order3
-
get shOrder3(): boolean
Include SH band 3 contribution. Default: true.
Returns boolean
-
set shOrder3(value: boolean): void
Parameters
- value: boolean
Returns void
sh Order4
-
get shOrder4(): boolean
Include SH band 4 contribution. Default: true.
Returns boolean
-
set shOrder4(value: boolean): void
Parameters
- value: boolean
Returns void
size Culling
-
Size culling range. Size is pow(|det(Σ)|, 1/6) of the 3D covariance matrix, equal to the geometric mean of the principal radii. Use GaussianSplattingMeshBase.splatSizeRange to find the asset's range. Set to null to disable.
Returns Nullable<{ max: number; min: number }>
-
Parameters
- value: Nullable<{ max: number; min: number }>
Returns void
Methods
add Fallbacks
-
Add fallbacks to the effect fallbacks list.
Parameters
- defines: MaterialDefines
defines the Base texture to use.
- fallbacks: EffectFallbacks
defines the current fallback list.
- currentRank: number
defines the current fallback rank.
Returns number
the new fallback rank.
- defines: MaterialDefines
bind For Sub Mesh
-
bindForSubMesh(
_uniformBuffer: UniformBuffer,
_scene: Scene,
_engine: AbstractEngine,
subMesh: SubMesh,
): voidBinds uniform values each frame. Scalar uniforms are uploaded for non-compound mode; the per-part data texture is updated and bound for compound mode.
Parameters
- _uniformBuffer: UniformBuffer
unused
- _scene: Scene
the current scene
- _engine: AbstractEngine
unused
- subMesh: SubMesh
the submesh being rendered
Returns void
- _uniformBuffer: UniformBuffer
clear Part Options
-
Clears all per-part debug overrides for the given part index, falling back to global settings.
Parameters
- partIndex: number
The zero-based part index.
Returns void
- partIndex: number
collect Defines
-
Collects all defines.
Parameters
- defines: { [name: string]: { default: any; type: string } }
The object to append to.
Returns void
- defines: { [name: string]: { default: any; type: string } }
copy To
-
Makes a duplicate of the current configuration into another one.
Parameters
- plugin: MaterialPluginBase
define the config where to copy the info
Returns void
- plugin: MaterialPluginBase
dispose
-
Disposes the per-part data texture.
Parameters
Optional_forceDisposeTextures: booleanunused; the LUT texture is always disposed as it is owned by this plugin
Returns void
fill Render Target Textures
-
Fills the list of render target textures.
Parameters
- _renderTargets: SmartArray<RenderTargetTexture>
the list of render targets to update
Returns void
- _renderTargets: SmartArray<RenderTargetTexture>
get Active Textures
-
Returns an array of the actively used textures.
Parameters
- _activeTextures: BaseTexture[]
Array of BaseTextures
Returns void
- _activeTextures: BaseTexture[]
get Animatables
-
Returns the animatable textures.
Parameters
- _animatables: IAnimatable[]
Array of animatable textures.
Returns void
- _animatables: IAnimatable[]
get Attributes
-
Gets the attributes used by the plugin.
Parameters
- _attributes: string[]
list that the attribute names should be added to.
- _scene: Scene
the scene that the material belongs to.
- _mesh: AbstractMesh
the mesh being rendered.
Returns void
- _attributes: string[]
get Class Name
-
Returns string
the class name of this plugin
get Custom Code
-
getCustomCode(
shaderType: string,
shaderLanguage?: ShaderLanguage,
): Nullable<{ [pointName: string]: string }>Returns shader code injections for the debug features.
Parameters
- shaderType: string
"vertex" or "fragment"
- shaderLanguage: ShaderLanguage = ShaderLanguage.GLSL
GLSL or WGSL
Returns Nullable<{ [pointName: string]: string }>
map of injection-point name to injected code, or null
- shaderType: string
get Samplers
-
Adds the per-part debug data texture name to the sampler list so the effect can bind it.
Parameters
- samplers: string[]
the sampler list to populate
Returns void
- samplers: string[]
get Uniform Buffers Names
-
Gets the uniform buffers names added by the plugin.
Parameters
- _ubos: string[]
list that the ubo names should be added to.
Returns void
- _ubos: string[]
get Uniforms
-
getUniforms(): {
externalUniforms?: string[];
fragment?: string;
ubo?: { arraySize?: number; name: string; size?: number; type?: string }[];
vertex?: string;
}Declares the non-compound scalar debug uniform names as external so the Effect can resolve their locations. WGSL uniforms are declared inline in getCustomCode() injections.
Returns {
externalUniforms?: string[];
fragment?: string;
ubo?: { arraySize?: number; name: string; size?: number; type?: string }[];
vertex?: string;
}uniform descriptor with externalUniforms list
hard Bind For Sub Mesh
-
hardBindForSubMesh(
_uniformBuffer: UniformBuffer,
_scene: Scene,
_engine: AbstractEngine,
_subMesh: SubMesh,
): voidBinds the material data (this function is called even if mustRebind() returns false)
Parameters
- _uniformBuffer: UniformBuffer
defines the Uniform buffer to fill in.
- _scene: Scene
defines the scene the material belongs to.
- _engine: AbstractEngine
defines the engine the material belongs to.
- _subMesh: SubMesh
the submesh to bind data for
Returns void
- _uniformBuffer: UniformBuffer
has Render Target Textures
-
Gets a boolean indicating that current material needs to register RTT
Returns boolean
true if this uses a render target otherwise false.
has Texture
-
Checks to see if a texture is used in the material.
Parameters
- _texture: BaseTexture
Base texture to use.
Returns boolean
- Boolean specifying if a texture is used in the material.
- _texture: BaseTexture
is Compatible
-
Parameters
- shaderLanguage: ShaderLanguage
the shader language to check
Returns boolean
true for GLSL and WGSL
- shaderLanguage: ShaderLanguage
is Ready For Sub Mesh
-
isReadyForSubMesh(
_defines: MaterialDefines,
_scene: Scene,
_engine: AbstractEngine,
_subMesh: SubMesh,
): booleanAlways ready — no async resources.
Parameters
- _defines: MaterialDefines
unused
- _scene: Scene
unused
- _engine: AbstractEngine
unused
- _subMesh: SubMesh
unused
Returns boolean
true
- _defines: MaterialDefines
parse
-
Parses a plugin configuration from a serialized object.
Parameters
- source: any
Serialized object.
- scene: Scene
Defines the scene we are parsing for
- rootUrl: string
Defines the rootUrl to load from
Returns void
- source: any
prepare Defines
-
Sets shader defines from current property state. GS_DBG_ENABLED is set to true only when at least one feature is non-default, ensuring zero overhead otherwise. Sub-flags also check per-part arrays so compound-only overrides activate the correct code paths even when the global setting is at its default.
Parameters
- defines: GaussianSplattingDebugDefines
the defines object
Returns void
- defines: GaussianSplattingDebugDefines
prepare Defines Before Attributes
-
prepareDefinesBeforeAttributes(
_defines: MaterialDefines,
_scene: Scene,
_mesh: AbstractMesh,
): voidSets the defines for the next rendering. Called before PrepareDefinesForAttributes is called.
Parameters
- _defines: MaterialDefines
the list of "defines" to update.
- _scene: Scene
defines the scene to the material belongs to.
- _mesh: AbstractMesh
the mesh being rendered
Returns void
- _defines: MaterialDefines
serialize
-
Serializes this plugin configuration.
Returns any
- An object with the serialized config.
set Part Options
-
Sets per-part debug overrides for the given part index. Only valid on compound meshes (partCount > 0); logs an error otherwise.
Parameters
- partIndex: number
The zero-based part index.
- options: Partial<IGaussianSplattingDebugOptions>
Partial set of debug options to override for this part.
Returns void
- partIndex: number
Debug plugin for GaussianSplattingMaterial. Provides runtime controls for clipping, opacity/size culling, opacity scaling, opacity saturation, and per-SH-order toggling. All features are gated behind the GS_DBG_ENABLED shader define — when every option is at its default value the define is absent and the shader compiles to identical code as without the plugin.
In compound mode (partCount > 0), per-part overrides can be set via setPartOptions(). Global settings act as defaults; per-part settings override them for that part index.