Diligent Engine
Loading...
Searching...
No Matches
Diligent::RadientTesseraMorphData Class Referencefinal

#include <RadientTesseraMorphData.hpp>

Public Member Functions

 RadientTesseraMorphData (IRadientMorphTargetWeights *pWeights, const RadientDrawableMesh &Mesh, Uint32 MaxActiveTargetCount)
RADIENT_STATUS Prepare (RadientFrameID RenderFrameID) noexcept
const PBR_Renderer::MorphTargetShaderAttribsGetShaderAttribs (Uint32 GeometryIndex, bool UsePreviousPalette) const noexcept
RADIENT_STATUS GetPreparationStatus () const noexcept
Uint32 GetActiveTargetCount (bool UsePreviousPalette) const noexcept
 Returns the active target count for the selected current or previous palette.

Detailed Description

Tessera-side active target palettes for one morph-target weights object.

The object retains the weights and prepares their bounded current and previous palettes once per renderer frame. It also owns shader records for each mesh geometry, shared by all entities and primitives using that geometry.

Constructor & Destructor Documentation

◆ RadientTesseraMorphData()

Diligent::RadientTesseraMorphData::RadientTesseraMorphData ( IRadientMorphTargetWeights * pWeights,
const RadientDrawableMesh & Mesh,
Uint32 MaxActiveTargetCount )

Initializes all morph-bearing geometries from a fully resolved mesh. Copies their immutable stream offsets without retaining source metadata.

Member Function Documentation

◆ GetPreparationStatus()

RADIENT_STATUS Diligent::RadientTesseraMorphData::GetPreparationStatus ( ) const
inlinenoexcept

Readiness of all morph geometries. PENDING until the first successful Prepare(); initialization failures apply to the entire morph data.

◆ GetShaderAttribs()

const PBR_Renderer::MorphTargetShaderAttribs * Diligent::RadientTesseraMorphData::GetShaderAttribs ( Uint32 GeometryIndex,
bool UsePreviousPalette ) const
inlinenoexcept

Returns a prepared geometry palette without copying. Requires an OK preparation status. Use the current palette for both frames when the view has no history. Pointers remain valid until destruction; Prepare() may update contents.

◆ Prepare()

RADIENT_STATUS Diligent::RadientTesseraMorphData::Prepare ( RadientFrameID RenderFrameID)
noexcept

Selects the strongest target weights and prepares all morph geometries together. Unchanged weights do not rebuild shader records. Repeated calls for the same frame are idempotent unless weights change. A skipped frame resets the shared current/previous palette history.