MorphedSkinnedGeometry class Geometry
Skinned geometry with morph targets, blended before the skin matrix is applied on both paths.
A skinned morphed draw spends two vertex-stage samplers (the joints texture plus the morph texture). With the 15-sampler lit fragment stage that totals 17 combined units, one over the GLES 3.0 minimum of 16, so a driver at the bare minimum cannot bind a lit skinned morphed draw (real GLES3 hardware reports 32 or more). TODO(morph-sampler-budget): pack the joint matrices and morph deltas into one vertex-stage texture to fit the GLES minimum.
- Inheritance
-
- Object
- Geometry
- SkinnedGeometry
- MorphedSkinnedGeometry
Constructors
- MorphedSkinnedGeometry(MorphTargetData morphTargets)
-
Creates skinned geometry morphed by
morphTargets.
Properties
- bindsModelTransformInstance → bool
-
Whether the color encoder should bind the node's model transform as a
one-element instance-rate buffer at the slot after this geometry's
vertex streams.
no setterinherited
- defaultVertexLayout → VertexLayoutDescriptor?
-
The layout this geometry kind uses when the caller supplies none.
Subclasses that describe their vertices override this.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReadable → bool Geometry
-
Whether this geometry retains CPU-side vertex data, making
extractMeshData available.
no setterinherited
- localBoundingSphere → Sphere?
-
Local-space bounding sphere paired with localBounds. Same
nullability semantics.
no setterinherited
- localBounds → Aabb3?
-
Local-space axis-aligned bounding box of this geometry's vertex
positions, or
nullif bounds are unknown. Computed by uploadVertexData for procedural geometry, populated from baked scene-package bounds for imported geometry, and (for the advanced setVertices path where the caller manages its own GPU buffer) leftnullunless the caller assigns it via setLocalBounds.no setterinherited - materialVertexVariant → String
-
The
.fmatvertex-variant key for this geometry's mesh type, used to select a custom material's generated vertex shader (seeMaterial.materialVertexShader). Unskinned geometry is'unskinned'; SkinnedGeometry overrides this to'skinned'.no setterinherited - morphTargets → MorphTargetData Geometry
-
The morph target deltas this geometry carries, or null for unmorphed
geometry. Overridden by the morphed geometry subclasses.
no setterinherited
- primitiveType ↔ PrimitiveType
-
How the vertex/index data is assembled into primitives when drawn.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usesGpuMorphing → bool
-
Whether this geometry blends on the GPU (the deltas fit the guaranteed
texture dimensions) or falls back to CPU blending.
no setterinherited
- vertexShader → Shader
-
The vertex shader used when rendering this geometry.
no setterinherited
Methods
-
bind(
RenderPass pass, TransientWriter transientsBuffer, Matrix4 modelTransform, Matrix4 cameraTransform, Vector3 cameraPosition, {Shader? shaderOverride, double depthBias = 0.0}) → void -
Binds vertex/index buffers and per-frame uniforms onto
passin preparation for a draw call.override -
draw(
RenderPass pass, {int instanceCount = 1}) → void -
Emits this geometry's draw call after bind has prepared the render pass.
inherited
-
extractMeshData(
) → MeshData Geometry -
Copies this geometry's retained CPU vertex/index data out as an
isolate-transferable MeshData snapshot.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCustomAttribute(
String name, Float32List data, {required int components}) → void Geometry -
Attaches a custom per-vertex attribute stream named
name, matching a material'sattributesentry (and the generated shader'sin <name>).inherited -
setIndices(
BufferView indices, IndexType indexType) → void -
Binds an already-uploaded index buffer view, with element width
determined by
indexType.inherited -
setJointsTexture(
Texture? texture, int width) → void -
Hook for skinned geometries to receive the joints texture computed
by Skin.getJointsTexture.
inherited
-
setLocalBounds(
Aabb3? aabb, Sphere? sphere) → void -
Override the bounds. Useful for callers driving setVertices from
a caller-managed
gpu.DeviceBufferwho want to participate in bounds-driven scene queries (e.g. frustum culling).inherited -
setMorphWeights(
Float32List? weights) → void -
Hook for morphed geometries to receive the owning node's morph weights.
inherited
-
setVertexLayout(
VertexLayoutDescriptor? layout, {bool bindsModelTransform = true}) → void -
inherited
-
setVertexShader(
Shader shader) → void -
Assigns the vertex
shaderused when this geometry is drawn.inherited -
setVertexShaderName(
String name) → void -
Assigns the vertex shader by
namefrom baseShaderLibrary.inherited -
setVertices(
BufferView vertices, int vertexCount) → void -
Binds an already-uploaded vertex buffer view as this geometry's
vertex source.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uploadVertexData(
ByteData vertices, int vertexCount, ByteData? indices, {IndexType indexType = gpu.IndexType.int16}) → void -
Allocates a
gpu.DeviceBufferand uploadsvertices(and optionalindices) into it in one step.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited