PrtEngine.ComputeVolumeSamples Method |
Language: |
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.
Visual Basic 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
);C++ public:
void ComputeVolumeSamples(
PrtBuffer^ previousData,
int shOrder,
array<Vector3>^ sampleLocations,
PrtBuffer^ dataOut
);JScript public function ComputeVolumeSamples(
previousData : PrtBuffer,
shOrder : int,
sampleLocations : Vector3[],
dataOut : PrtBuffer
);
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 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 SH basis vectors. This buffer must have the proper number of color channels allocated for the simulation.
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 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 Microsoft Direct3D could not allocate sufficient memory to complete the call.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center