PrtEngine.ComputeVolumeSamplesDirectSphericalHarmonics Method |
Language: |
Computes a projection of distant lighting into spherical harmonic (SH) basis vectors that represent incident radiance at specified locations.
Visual Basic Public Sub ComputeVolumeSamplesDirectSphericalHarmonics( _
ByVal shOrderIn As Integer, _
ByVal shOrder As Integer, _
ByVal sampleLocations() As Vector3, _
ByVal dataOut As PrtBuffer _
)C# public void ComputeVolumeSamplesDirectSphericalHarmonics(
int shOrderIn,
int shOrder,
Vector3[] sampleLocations,
PrtBuffer dataOut
);C++ public:
void ComputeVolumeSamplesDirectSphericalHarmonics(
int shOrderIn,
int shOrder,
array<Vector3>^ sampleLocations,
PrtBuffer^ dataOut
);JScript public function ComputeVolumeSamplesDirectSphericalHarmonics(
shOrderIn : int,
shOrder : int,
sampleLocations : Vector3[],
dataOut : PrtBuffer
);
shOrderIn System.Int32
Order of the SH representation of distant lighting. Must be in the range of SphericalHarmonics.MinimumOrder to SphericalHarmonics.MaximumOrder, inclusive. The degree of the evaluation is shOrderIn - 1.shOrder System.Int32
Order of the SH representation of local lighting. Must be in the range of SphericalHarmonics.MinimumOrder to SphericalHarmonics.MaximumOrder, inclusive. 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 distant lighting into SH basis vectors. This buffer must have the proper number of color channels allocated for the simulation. This method generates shOrderIn2 * shOrder2 scalars per channel at each sample location.
This method computes how light from a distant source 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