PrtEngine.ComputeDirectLightingSphericalHarmonics(Int32,PrtBuffer) Method (Microsoft.DirectX.Direct3D)
Computes the direct-lighting contribution to 3-D objects where the source radiance is represented by a spherical harmonic (SH) approximation.
Definition
Visual Basic Public Sub ComputeDirectLightingSphericalHarmonics( _
ByVal shOrder As Integer, _
ByVal data As PrtBuffer _
)C# public void ComputeDirectLightingSphericalHarmonics(
int shOrder,
PrtBuffer data
);C++ public:
void ComputeDirectLightingSphericalHarmonics(
int shOrder,
PrtBuffer^ data
);JScript public function ComputeDirectLightingSphericalHarmonics(
shOrder : int,
data : PrtBuffer
);
Parameters
shOrder System.Int32
Order of the 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 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
The method call is invalid. For example, a method's parameter might contain an invalid value.
Microsoft Direct3D could not allocate sufficient memory to complete the call.