Microsoft DirectX 9.0 SDK Update (October 2004)

PrtEngine.ComputeVolumeSamples Method

Language:

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

Computes a projection of the direct lighting from the previous light bounce into spherical harmonic (SH) basis vectors that represent incident radiance at specified locations.

Definition

Visual Basic .NET Public Sub ComputeVolumeSamples( _
    ByVal previousData As PrtBuffer, _
    ByVal shOrder As Integer, _
    ByVal sampleLocations() As Vector3, _
    ByVal dataOut As PrtBuffer _
)
C# public void ComputeVolumeSamples(
    PrtBuffer previousData,
    int shOrder,
    Vector3[] sampleLocations,
    PrtBuffer dataOut
);
Managed C++ public: void ComputeVolumeSamples(
    PrtBuffer *previousData,
    int shOrder,
    Vector3 sampleLocations __gc[],
    PrtBuffer *dataOut
);
JScript .NET public function ComputeVolumeSamples(
    previousData : PrtBuffer,
    shOrder : int,
    sampleLocations : Vector3[],
    dataOut : PrtBuffer
);

Parameters

previousData Microsoft.DirectX.Direct3D.PrtBuffer. A PrtBuffer object that represents the 3-D object from the previous light bounce. This buffer must have the proper number of color channels allocated for the simulation.
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.
sampleLocations Microsoft.DirectX.Vector3[]. An integer array that contains the position for each sample.
dataOut Microsoft.DirectX.Direct3D.PrtBuffer. A PrtBuffer object that projects the direct lighting from the previous light bounce into spherical harmonic (SH) basis vectors. This buffer must have the proper number of color channels allocated for the simulation.

Remarks

This method computes how the light from the source radiance function is reflected off the surface that represents the scene (previousData) and arrives at each point in space specified by sampleLocations. The spherical harmonic (SH) coefficients represent the mapping, at each sampleLocations point, of source radiance to transferred incident radiance.

To use this method successfully, you must set sampling over a sphere with the parameter isUsingSphere set to true and the parameter isUsingCosine set to false in a call to PrtEngine.SetSamplingInfo, otherwise an exception is thrown.

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.

See Also


© 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