Class GaussianSplattingGpuPickingMaterialPluginExperimental
Hierarchy (View Summary)
- MaterialPluginBase
- GaussianSplattingGpuPickingMaterialPlugin
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
new GaussianSplattingGpuPickingMaterialPlugin(
material: GaussianSplattingMaterial,
maxPartCount?: number,
): GaussianSplattingGpuPickingMaterialPluginExperimentalCreates a new GaussianSplattingGpuPickingMaterialPlugin.
Parameters
- material: GaussianSplattingMaterial
The GaussianSplattingMaterial to attach the plugin to.
OptionalmaxPartCount: numberThe maximum number of parts supported for compound meshes.
Returns GaussianSplattingGpuPickingMaterialPlugin
- material: GaussianSplattingMaterial
Properties
Experimentaldo Not Serialize
Specifies if the material plugin should be serialized, true to skip serialization
Readonly Experimentalmark All Defines As Dirty
Helper function to mark defines as being dirty.
Experimentalname
Defines the name of the plugin
Experimentalpriority
Defines the priority of the plugin. Lower numbers run first.
Experimentalregister For Extra Events
Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)
Experimentalresolve Includes
Indicates that any #include directive in the plugin code must be replaced by the corresponding code.
Accessors
enable Depth Picking
-
set enableDepthPicking(value: boolean): void
ExperimentalEnables writing the GPU picker depth MRT attachment.
Parameters
- value: boolean
Returns void
enable Packed Depth Picking
-
set enablePackedDepthPicking(value: boolean): void
ExperimentalEnables byte-packed depth output for the GPU picker depth MRT attachment.
Parameters
- value: boolean
Returns void
is Compound
-
get isCompound(): boolean
ExperimentalGets whether this material is for a compound mesh with per-part picking.
Returns boolean
-
set isCompound(value: boolean): void
ExperimentalSets whether this material is for a compound mesh with per-part picking.
Parameters
- value: boolean
Returns void
mesh Id
-
set meshId(id: number): void
ExperimentalSets the picking color for a non-compound mesh from a picking ID. The ID is encoded into an RGB color on the CPU.
Parameters
- id: number
The 24-bit picking ID.
Returns void
- id: number
part Mesh Ids
-
set partMeshIds(ids: number[]): void
ExperimentalSets the per-part picking colors from an array of picking IDs. Each ID is encoded into an RGB color on the CPU.
Parameters
- ids: number[]
Array mapping part index to picking ID.
Returns void
- ids: number[]
Methods
add Fallbacks
-
ExperimentalAdd 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,
): voidExperimentalBinds the picking color uniform(s) each frame.
Parameters
- _uniformBuffer: UniformBuffer
the uniform buffer (unused — we bind directly on the effect)
- _scene: Scene
the current scene
- _engine: AbstractEngine
the current engine
- subMesh: SubMesh
the submesh being rendered
Returns void
- _uniformBuffer: UniformBuffer
collect Defines
-
ExperimentalCollects 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
-
ExperimentalMakes 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
-
ExperimentalDisposes the resources of the material.
Parameters
Optional_forceDisposeTextures: booleanForces the disposal of all textures.
Returns void
fill Render Target Textures
-
ExperimentalFills 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
-
ExperimentalReturns an array of the actively used textures.
Parameters
- _activeTextures: BaseTexture[]
Array of BaseTextures
Returns void
- _activeTextures: BaseTexture[]
get Animatables
-
ExperimentalReturns the animatable textures.
Parameters
- _animatables: IAnimatable[]
Array of animatable textures.
Returns void
- _animatables: IAnimatable[]
get Attributes
-
ExperimentalGets 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
-
ExperimentalReturns string
the class name
get Custom Code
-
getCustomCode(
shaderType: string,
shaderLanguage?: ShaderLanguage,
): Nullable<{ [pointName: string]: string }>ExperimentalReturns custom shader code to inject GPU picking color output.
Parameters
- shaderType: string
"vertex" or "fragment"
- shaderLanguage: ShaderLanguage = ShaderLanguage.GLSL
the shader language to use (default: GLSL)
Returns Nullable<{ [pointName: string]: string }>
null or a map of injection point names to code strings
- shaderType: string
get Samplers
-
ExperimentalGets the samplers used by the plugin.
Parameters
- _samplers: string[]
list that the sampler names should be added to.
Returns void
- _samplers: string[]
get Uniform Buffers Names
-
ExperimentalGets 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;
}ExperimentalRegisters the picking uniforms with the engine.
Returns {
externalUniforms?: string[];
fragment?: string;
ubo?: { arraySize?: number; name: string; size?: number; type?: string }[];
vertex?: string;
}uniform descriptions
hard Bind For Sub Mesh
-
hardBindForSubMesh(
_uniformBuffer: UniformBuffer,
_scene: Scene,
_engine: AbstractEngine,
_subMesh: SubMesh,
): voidExperimentalBinds 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
-
ExperimentalGets a boolean indicating that current material needs to register RTT
Returns boolean
true if this uses a render target otherwise false.
has Texture
-
ExperimentalChecks 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
-
ExperimentalIndicates this plugin supports both GLSL and WGSL.
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,
): booleanExperimentalAlways ready — no textures or async resources to wait on.
Parameters
- _defines: MaterialDefines
the defines
- _scene: Scene
the scene
- _engine: AbstractEngine
the engine
- _subMesh: SubMesh
the submesh
Returns boolean
true
- _defines: MaterialDefines
parse
-
ExperimentalParses 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
-
ExperimentalSets the defines for the next rendering.
Parameters
- defines: MaterialDefines
the list of defines to update
Returns void
- defines: MaterialDefines
prepare Defines Before Attributes
-
prepareDefinesBeforeAttributes(
_defines: MaterialDefines,
_scene: Scene,
_mesh: AbstractMesh,
): voidExperimentalSets 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
-
ExperimentalSerializes this plugin configuration.
Returns any
- An object with the serialized config.
set Part Active
-
ExperimentalSets which parts are active (pickable) for the compound picking pass. Parts not in the set are discarded in the shader by overriding partVisibility to 0.
Parameters
- activeParts: number[]
Array of part indices that should be pickable.
Returns void
- activeParts: number[]
StaticEncode Id To Color
-
ExperimentalEncodes a 24-bit picking ID into normalized RGB components.
Parameters
- id: number
The picking ID to encode
Returns [number, number, number]
A tuple [r, g, b] with values in [0, 1]
- id: number
Plugin for GaussianSplattingMaterial that replaces per-splat color output with a pre-computed picking color for GPU-based hit testing.
The picking color is computed on the CPU by encoding a 24-bit picking ID as RGB (matching the readback decoding in GPUPicker).