Microsoft DirectX 9.0 SDK Update (October 2004)

PrtEngine.ComputeDirectLightingSphericalHarmonics Method

Language:

Note: This documentation is preliminary and is subject to change.

Computes the direct-lighting contribution to 3-D objects where the source radiance is represented by a spherical harmonic (SH) approximation.

Definition

Visual Basic .NET Public Sub ComputeDirectLightingSphericalHarmonics( _
    ByVal shOrder As Integer, _
    ByVal data As PrtBuffer _
)
C# public void ComputeDirectLightingSphericalHarmonics(
    int shOrder,
    PrtBuffer data
);
Managed C++ public: void ComputeDirectLightingSphericalHarmonics(
    int shOrder,
    PrtBuffer *data
);
JScript .NET public function ComputeDirectLightingSphericalHarmonics(
    shOrder : int,
    data : PrtBuffer
);

Parameters

shOrder System.Int32. Order of the spherical harmonic (SH) evaluation. Must be in the range of SphericalHarmonics.MinimumOrder to SphericalHarmonics.MaximumOrder, inclusive. The evaluation generates shOrder2 coefficients. The degree of the evaluation is shOrder - 1.
data Microsoft.DirectX.Direct3D.PrtBuffer. A PrtBuffer object that models the direct lighting contribution with the spherical harmonic (SH) approximation. This buffer must have the proper number of color channels allocated for the simulation.

Remarks

The output does not include albedo, and only incoming light is integrated in the simulator. By not multiplying the albedo, you can model albedo variation at a finer scale than the source radiance, thereby yielding more accurate results from compression.

Call PrtEngine.MultiplyAlbedo to multiply each precomputed radiance transfer (PRT) vector by the albedo.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
OutOfMemoryException Leave Site Microsoft® Direct3D® could not allocate sufficient memory to complete the call.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center