d3d9.dllComputeConvCoeffs
Microsoft DirectX 9.0 SDK Update (October 2004)

ID3DXPRTEngine::ComputeConvCoeffs Method


Computes convolution coefficients relative to per-sample normal vectors to minimize the least-squares error with respect to input precomputed radiance transfer (PRT) data. The convolution coefficients can be used with skinned or transformed normals to model global effects on dynamic objects.

Syntax

HRESULT ComputeConvCoeffs(      

    LPD3DXPRTBUFFER pDataIn,     UINT Order,     D3DXVECTOR3 *pNormOut,     LPD3DXPRTBUFFER pDataOut );

Parameters

pDataIn
[in] Pointer to an input ID3DXPRTBuffer spherical harmonic (SH) PRT data object.
Order
[in] Order of the SH evaluation. Must be in the range of D3DXSH_MINORDER to D3DXSH_MAXORDER, inclusive. The evaluation generates Order2 coefficients. The degree of the evaluation is Order - 1.
pNormOut
[in, out] Optional vector array to be filled with shader-optimal normal vectors for which convolution coefficients are optimized. This array must be the same size as the number of samples in pDataIn. If NULL, surface normals are used.
pDataOut
[in, out] Pointer to an output ID3DXPRTBuffer object that contains Order convolution coefficients per color channel per sample.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following:

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
E_OUTOFMEMORYMicrosoft Direct3D could not allocate sufficient memory to complete the call.




© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.