ID3DXPRTEngine::ComputeSurfSamplesBounce method

Computes precomputed radiance transfer (PRT) samples for an arbitrary point (and normal vector).

Syntax

HRESULT ComputeSurfSamplesBounce(
  [in]            LPD3DXPRTBUFFER pSurfDataIn,
  [in]            UINT            NumSamples,
  [in]      const D3DXVECTOR3     *pSampleLocs,
  [in]      const D3DXVECTOR3     *pSampleNorms,
  [in, out]       LPD3DXPRTBUFFER pDataOut,
  [in, out]       LPD3DXPRTBUFFER pDataTotal
);

Parameters

pSurfDataIn [in]

Type: LPD3DXPRTBUFFER

Pointer to an input ID3DXPRTBuffer object that represents the source radiance of the 3D object. This input buffer must have the proper number of color channels allocated for the simulation.

NumSamples [in]

Type: UINT

Number of sample locations.

pSampleLocs [in]

Type: const D3DXVECTOR3*

Position for each sample.

pSampleNorms [in]

Type: const D3DXVECTOR3*

Normal vector for each sample location.

pDataOut [in, out]

Type: LPD3DXPRTBUFFER

Pointer to an output ID3DXPRTBuffer object that models the direct lighting contribution to the point, using the spherical harmonic (SH) approximation.

pDataTotal [in, out]

Type: LPD3DXPRTBUFFER

Pointer to an optional ID3DXPRTBuffer object that is the running sum of all previous pDataOut outputs. May be NULL.

Return value

Type: HRESULT

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

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

ID3DXPRTEngine

ID3DXPRTEngine::ComputeSurfSamplesDirectSH