Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

D3DXSHMultiply2 function

Computes the product of two functions represented using SH (f and g).


FLOAT* D3DXSHMultiply2(
  _In_       FLOAT *pOut,
  _In_ const FLOAT *pF,
  _In_ const FLOAT *pG


pOut [in]

Type: FLOAT*

Pointer to the output SH coefficients - basis function Ylm is stored at l*l + m+l.

pF [in]

Type: const FLOAT*

Input SH coeffs for first function.

pG [in]

Type: const FLOAT*

Second set of input SH coeffs.

Return value

Type: FLOAT*

Pointer to SH output coefficients.


The order is a number between 2 and 6 inclusive. So this page actually documents several functions: D3DXSHMultiply2, D3DXSHMultiply3, ... D3DXSHMultiply6.

Computes the product of two functions represented using SH (f and g), where pOut[i] = int(y_i(s) * f(s) * g(s)), where y_i(s) is the ith SH basis function, f(s) and g(s) are SH functions (sum_i(y_i(s)*c_i)). The order O determines the lengths of the arrays, where there should always be O^2 coefficients. In general the product of two SH functions of order O generates an SH function of order 2*O - 1, 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.




See also

Math Functions



Community Additions

© 2015 Microsoft