D3DXSHPRTCompSuperCluster function

Used with compressed results of the vertex version of the precomputed radiance transfer (PRT) simulator. Generates "superclusters," which are groups of clusters that can be drawn in the same draw call. A greedy algorithm that minimizes overdraw is used to group the clusters.

Syntax

HRESULT D3DXSHPRTCompSuperCluster(
  _In_    UINT       *pClusterIDs,
  _In_    LPD3DXMESH pScene,
  _In_    UINT       MaxNumClusters,
  _In_    UINT       NumClusters,
  _Inout_ UINT       *pSClusterIDs,
  _Inout_ UINT       *pNumSCs
);

Parameters

pClusterIDs [in]

Type: UINT*

Pointer to a NumVerts cluster IDs (extracted from a compressed buffer.)

pScene [in]

Type: LPD3DXMESH

Pointer to a mesh that represents composite scene passed to the simulator. See ID3DXMesh.

MaxNumClusters [in]

Type: UINT

Maximum number of clusters allocated per super cluster.

NumClusters [in]

Type: UINT

Number of clusters computed in the simulator.

pSClusterIDs [in, out]

Type: UINT*

Pointer to an array of length NumClusters. Contains the index of the super cluster to which the corresponding cluster was assigned.

pNumSCs [in, out]

Type: UINT*

Number of super clusters allocated.

Return value

Type: HRESULT

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

Precomputed Radiance Transfer Functions