ID3DXPRTEngine::ComputeSurfSamplesDirectSH method
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.
Syntax
HRESULT ComputeSurfSamplesDirectSH(
[in] UINT SHOrder,
[in] UINT NumSamples,
[in] const D3DXVECTOR3 *pSampleLocs,
[in] const D3DXVECTOR3 *pSampleNorms,
[in, out] LPD3DXPRTBUFFER pDataOut
);
Parameters
-
SHOrder [in]
-
Type: UINT
Order of the SH approximation to use.
-
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 SH approximation.
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.
Remarks
Do not use a texture buffer when calling this method.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also