D3DX11SHProjectCubeMap function

Note

The D3DX (D3DX 9, D3DX 10, and D3DX 11) utility library is deprecated and is not supported for Windows Store apps.

Note

Instead of using this function, we recommend that you use the Spherical Harmonics Math library function SHProjectCubeMap.

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

Syntax

HRESULT D3DX11SHProjectCubeMap(
   ID3D11DeviceContext *pContext,
   UINT                Order,
   ID3D11Texture2D     *pCubeMap,
   FLOAT               *pROut,
   FLOAT               *pGOut,
   FLOAT               *pBOut
);

Parameters

pContext

Type: ID3D11DeviceContext*

A pointer to an ID3D11DeviceContext object.

Order

Type: UINT

Order of the SH evaluation, generates Order^2 coefficients whose degree is Order-1. Valid range is between 2 and 6.

pCubeMap

Type: ID3D11Texture2D*

A pointer to an ID3D11Texture2D that represents a cubemap that is going to be projected into spherical harmonics.

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 11 Return Codes.

Requirements

Requirement Value
Header
D3DX11tex.h
Library
D3DX11.lib

See also

D3DX Functions