ID3DXPRTEngine::ComputeSurfSamplesDirectSH

Computes, at an arbitrary point not on a mesh, a transfer vector that maps source radiance (represented by a spherical harmonic (SH) approximation) to exit radiance.

HRESULT ComputeSurfSamplesDirectSH(
  UINT SHOrder,
  UINT NumSamples,
  CONST D3DXVECTOR3 * pSampleLocs,
  CONST D3DXVECTOR3 * pSampleNorms,
  LPD3DXPRTBUFFER pDataOut
);

Parameters

SHOrder
[in] Order of the SH approximation to use.
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 SH approximation.

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.

Remarks

Do not use a texture buffer when calling this method.

Requirements

Header: Declared in D3dx9mesh.h.

See Also

ID3DXPRTEngine::ComputeDirectLightingSH, ID3DXPRTEngine::ComputeSurfSamplesBounce