![]() |
![]() |
![]() |
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
Header d3dx9math.h Import library d3dx9.lib Minimum operating systems Windows 98
See Also
Precomputed Radiance Transfer