Skip to content

Latest commit

 

History

History
121 lines (72 loc) · 2.52 KB

d3d10-d3dxshmultiply6.md

File metadata and controls

121 lines (72 loc) · 2.52 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location
Computes the product of two spherical harmonics functions (f and g). Both functions are of order N = 6.
3b68b238-c1ae-4ab8-89ed-bdf815463143
D3DXSHMultiply6 function (D3DX10Math.h)
reference
05/31/2018
APIRef
kbSyntax
D3DXSHMultiply6
LibDef
D3DX10.lib
D3DX10.dll

D3DXSHMultiply6 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 XMSHMultiply6.

Computes the product of two spherical harmonics functions (f and g). Both functions are of order N = 6.

Syntax

FLOAT* D3DXSHMultiply6(
  _In_       FLOAT *pOut,
  _In_ const FLOAT *pF,
  _In_ const FLOAT *pG
);

Parameters

pOut [in]

Type: FLOAT*

Pointer to the output SH coefficients — the basis function Yₗₘ is stored at l² + m + l. The order N determines the length of the array, where there should always be N² coefficients.

pF [in]

Type: const FLOAT*

Input SH coefficients for first function.

pG [in]

Type: const FLOAT*

Second set of input SH coefficients.

Return value

Type: FLOAT*

Pointer to SH output coefficients.

Remarks

The product of two SH functions of order N = 6 generates an SH function of order 2 × N - 1 = 11, but the results are truncated. This means that the product commutes ( f × g = g × f ) but doesn't associate ( f × ( g × h ) ≠ ( f × g ) × h ).

This function uses the following equation:

pOut[i] = int(y_i(s) * f(s) * g(s))

where y_i(s) is the ith SH basis function, and where f(s) and g(s) use the following SH function:

sum_i(y_i(s)*c_i)

Requirements

Requirement Value
Header
D3DX10Math.h
Library
D3DX10.lib

See also

Math Functions