D3DXSHProjectCubeMap
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXSHProjectCubeMap Function


Projects a function represented on a cube map into spherical harmonics (SH).

Syntax

HRESULT WINAPI D3DXSHProjectCubeMap(      

    UINT Order,     LPDIRECT3DCUBETEXTURE9 pCubeMap,     FLOAT *pROut,     FLOAT *pGOut,     FLOAT *pBOut );

Parameters

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.
pCubeMap
[in] Pointer to a source cube texture. See IDirect3DCubeTexture9.
pROut
[in] Pointer to the output SH vector for the red component.
pGOut
[in] Pointer to the output SH vector for the green component.
pBOut
[in] Pointer to the output SH vector for the blue component.

Return Value

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be D3DERR_INVALIDCALL.



Function Information

Headerd3dx9math.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98

See Also

Precomputed Radiance Transfer


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