D3DX10SHProjectCubeMap function

Projects a function represented in a cube map into spherical harmonics.

Syntax

HRESULT D3DX10SHProjectCubeMap(
   UINT            Order,
   ID3D10Texture2D *pCubeMap,
   FLOAT           *pROut,
   FLOAT           *pGOut,
   FLOAT           *pBOut
);

Parameters

Order

Type: UINT

Order of the SH evaluation, generates Order^2 coefs, degree is Order-1.

pCubeMap

Type: ID3D10Texture2D*

Cubemap that is going to be projected into spherical harmonics. See ID3D10Texture2D.

pROut

Type: FLOAT*

Output SH vector for red.

pGOut

Type: FLOAT*

Output SH vector for green.

pBOut

Type: FLOAT*

Output SH vector for blue.

Return value

Type: HRESULT

The return value is one of the values listed in Direct3D 10 Return Codes.

Requirements

Requirement Value
Header
D3DX10Tex.h
Library
D3DX10.lib

See also

Math Functions