MorphTargetBuffer

actual class MorphTargetBuffer

A container for vertex morphing data that supports both automatic and manual morphing.

MorphTargetBuffer operates in a hybrid model depending on the attribute being morphed:

1. Automatic for Built-ins (positions/tangents): Enable via withPositions(true) or withTangents(true). The MorphTargetBuffer will allocate internal storage and hold the data for these attributes, which you upload via setPositionsAt() or setTangentsAt(). The framework automatically applies the morphing logic in the vertex shader.

2. Manual for Custom Data (e.g., UVs, colors): The MorphTargetBuffer does NOT hold data for custom targets. The user is responsible for the full data pipeline:

  • Create and manage a separate Texture to hold the morph target data (offsets).

  • In the material, declare a sampler2d_array parameter.

  • Bind the Texture to the material instance.

  • In the vertex shader, manually call morphData2, morphData3, or morphData4 with the custom sampler to apply the morphing.

A MorphTargetBuffer object must be associated with a Renderable via RenderableManager.Builder.morphing() to enable the morphing pipeline.

See also

expect class MorphTargetBuffer

A container for vertex morphing data that supports both automatic and manual morphing.

MorphTargetBuffer operates in a hybrid model depending on the attribute being morphed:

1. Automatic for Built-ins (positions/tangents): Enable via withPositions(true) or withTangents(true). The MorphTargetBuffer will allocate internal storage and hold the data for these attributes, which you upload via setPositionsAt() or setTangentsAt(). The framework automatically applies the morphing logic in the vertex shader.

2. Manual for Custom Data (e.g., UVs, colors): The MorphTargetBuffer does NOT hold data for custom targets. The user is responsible for the full data pipeline:

  • Create and manage a separate Texture to hold the morph target data (offsets).

  • In the material, declare a sampler2d_array parameter.

  • Bind the Texture to the material instance.

  • In the vertex shader, manually call morphData2, morphData3, or morphData4 with the custom sampler to apply the morphing.

A MorphTargetBuffer object must be associated with a Renderable via RenderableManager.Builder.morphing() to enable the morphing pipeline.

See also

actual class MorphTargetBuffer

A container for vertex morphing data that supports both automatic and manual morphing.

MorphTargetBuffer operates in a hybrid model depending on the attribute being morphed:

1. Automatic for Built-ins (positions/tangents): Enable via withPositions(true) or withTangents(true). The MorphTargetBuffer will allocate internal storage and hold the data for these attributes, which you upload via setPositionsAt() or setTangentsAt(). The framework automatically applies the morphing logic in the vertex shader.

2. Manual for Custom Data (e.g., UVs, colors): The MorphTargetBuffer does NOT hold data for custom targets. The user is responsible for the full data pipeline:

  • Create and manage a separate Texture to hold the morph target data (offsets).

  • In the material, declare a sampler2d_array parameter.

  • Bind the Texture to the material instance.

  • In the vertex shader, manually call morphData2, morphData3, or morphData4 with the custom sampler to apply the morphing.

A MorphTargetBuffer object must be associated with a Renderable via RenderableManager.Builder.morphing() to enable the morphing pipeline.

See also

actual class MorphTargetBuffer

A container for vertex morphing data that supports both automatic and manual morphing.

MorphTargetBuffer operates in a hybrid model depending on the attribute being morphed:

1. Automatic for Built-ins (positions/tangents): Enable via withPositions(true) or withTangents(true). The MorphTargetBuffer will allocate internal storage and hold the data for these attributes, which you upload via setPositionsAt() or setTangentsAt(). The framework automatically applies the morphing logic in the vertex shader.

2. Manual for Custom Data (e.g., UVs, colors): The MorphTargetBuffer does NOT hold data for custom targets. The user is responsible for the full data pipeline:

  • Create and manage a separate Texture to hold the morph target data (offsets).

  • In the material, declare a sampler2d_array parameter.

  • Bind the Texture to the material instance.

  • In the vertex shader, manually call morphData2, morphData3, or morphData4 with the custom sampler to apply the morphing.

A MorphTargetBuffer object must be associated with a Renderable via RenderableManager.Builder.morphing() to enable the morphing pipeline.

See also

actual class MorphTargetBuffer

A container for vertex morphing data that supports both automatic and manual morphing.

MorphTargetBuffer operates in a hybrid model depending on the attribute being morphed:

1. Automatic for Built-ins (positions/tangents): Enable via withPositions(true) or withTangents(true). The MorphTargetBuffer will allocate internal storage and hold the data for these attributes, which you upload via setPositionsAt() or setTangentsAt(). The framework automatically applies the morphing logic in the vertex shader.

2. Manual for Custom Data (e.g., UVs, colors): The MorphTargetBuffer does NOT hold data for custom targets. The user is responsible for the full data pipeline:

  • Create and manage a separate Texture to hold the morph target data (offsets).

  • In the material, declare a sampler2d_array parameter.

  • Bind the Texture to the material instance.

  • In the vertex shader, manually call morphData2, morphData3, or morphData4 with the custom sampler to apply the morphing.

A MorphTargetBuffer object must be associated with a Renderable via RenderableManager.Builder.morphing() to enable the morphing pipeline.

See also

Types

Link copied to clipboard
actual class Builder

Builder for creating MorphTargetBuffer instances.

expect class Builder

Builder for creating MorphTargetBuffer instances.

actual class Builder

Builder for creating MorphTargetBuffer instances.

actual class Builder

Builder for creating MorphTargetBuffer instances.

actual class Builder

Builder for creating MorphTargetBuffer instances.

Properties

Link copied to clipboard
actual val count: Int

Gets the number of morph targets (blend shapes) allocated.

expect val count: Int

Gets the number of morph targets (blend shapes) allocated.

actual val count: Int

Gets the number of morph targets (blend shapes) allocated.

actual val count: Int

Gets the number of morph targets (blend shapes) allocated.

actual val count: Int

Gets the number of morph targets (blend shapes) allocated.

Link copied to clipboard
actual val hasPositions: Boolean

Indicates whether this buffer supports automatic position morphing.

expect val hasPositions: Boolean

Indicates whether this buffer supports automatic position morphing.

actual val hasPositions: Boolean

Indicates whether this buffer supports automatic position morphing.

actual val hasPositions: Boolean

Indicates whether this buffer supports automatic position morphing.

actual val hasPositions: Boolean

Indicates whether this buffer supports automatic position morphing.

Link copied to clipboard
actual val hasTangents: Boolean

Indicates whether this buffer supports automatic tangent morphing.

expect val hasTangents: Boolean

Indicates whether this buffer supports automatic tangent morphing.

actual val hasTangents: Boolean

Indicates whether this buffer supports automatic tangent morphing.

actual val hasTangents: Boolean

Indicates whether this buffer supports automatic tangent morphing.

actual val hasTangents: Boolean

Indicates whether this buffer supports automatic tangent morphing.

Link copied to clipboard

Indicates whether custom morphing is enabled for user-defined attributes.

Indicates whether custom morphing is enabled for user-defined attributes.

Indicates whether custom morphing is enabled for user-defined attributes.

Indicates whether custom morphing is enabled for user-defined attributes.

Indicates whether custom morphing is enabled for user-defined attributes.

Link copied to clipboard
val nativeMorphTargetBuffer: MorphTargetBuffer
Link copied to clipboard
actual val vertexCount: Int

Gets the number of vertices this MorphTargetBuffer can hold.

expect val vertexCount: Int

Gets the number of vertices this MorphTargetBuffer can hold.

actual val vertexCount: Int

Gets the number of vertices this MorphTargetBuffer can hold.

actual val vertexCount: Int

Gets the number of vertices this MorphTargetBuffer can hold.

actual val vertexCount: Int

Gets the number of vertices this MorphTargetBuffer can hold.

Functions

Link copied to clipboard
actual fun setPositionsAt(engine: Engine, targetIndex: Int, positions: FloatArray, count: Int)

Upload position data for a specific morph target.

expect fun setPositionsAt(engine: Engine, targetIndex: Int, positions: FloatArray, count: Int)

Upload position data for a specific morph target.

actual fun setPositionsAt(engine: Engine, targetIndex: Int, positions: FloatArray, count: Int)

Upload position data for a specific morph target.

actual fun setPositionsAt(engine: Engine, targetIndex: Int, positions: FloatArray, count: Int)

Upload position data for a specific morph target.

actual fun setPositionsAt(engine: Engine, targetIndex: Int, positions: FloatArray, count: Int)

Upload position data for a specific morph target.

Link copied to clipboard
actual fun setTangentsAt(engine: Engine, targetIndex: Int, tangents: ShortArray, count: Int)

Upload tangent data for a specific morph target.

expect fun setTangentsAt(engine: Engine, targetIndex: Int, tangents: ShortArray, count: Int)

Upload tangent data for a specific morph target.

actual fun setTangentsAt(engine: Engine, targetIndex: Int, tangents: ShortArray, count: Int)

Upload tangent data for a specific morph target.

actual fun setTangentsAt(engine: Engine, targetIndex: Int, tangents: ShortArray, count: Int)

Upload tangent data for a specific morph target.

actual fun setTangentsAt(engine: Engine, targetIndex: Int, tangents: ShortArray, count: Int)

Upload tangent data for a specific morph target.