ID3DXPRTEngine::ComputeSurfSamplesBounce

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

HRESULT ComputeSurfSamplesBounce(
  LPD3DXPRTBUFFER pSurfDataIn,
  UINT NumSamples,
  CONST D3DXVECTOR3 * pSampleLocs,
  CONST D3DXVECTOR3 * pSampleNorms,
  LPD3DXPRTBUFFER pDataOut,
  LPD3DXPRTBUFFER pDataTotal
);

Parameters

pSurfDataIn
[in] 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] Number of sample locations.
pSampleLocs
[in] Position for each sample.
pSampleNorms
[in] Normal vector for each sample location.
pDataOut
[in, out] Pointer to an output ID3DXPRTBuffer object that models the direct lighting contribution to the point, using the spherical harmonic (SH) approximation.
pDataTotal
[in, out] Pointer to an optional ID3DXPRTBuffer object that is the running sum of all previous pDataOut outputs. May be NULL.

Return Values

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

Header: Declared in D3dx9mesh.h.

See Also

ID3DXPRTEngine::ComputeSurfSamplesDirectSH