Share via


PrtEngine.ComputeSurfSamplesDirectSphericalHarmonics(Int32,Vector3[],Vector3[],PrtBuffer) Method (Microsoft.DirectX.Direct3D)

Computes, at an arbitrary point not on a mesh, a transfer vector that maps source radiance (represented by a spherical harmonic (SH) approximation) to exit radiance.

Definition

Visual Basic Public Sub ComputeSurfSamplesDirectSphericalHarmonics( _
    ByVal shOrder As Integer, _
    ByVal sampleLocations() As Vector3, _
    ByVal sampleNormals() As Vector3, _
    ByVal data As PrtBuffer _
)
C# public void ComputeSurfSamplesDirectSphericalHarmonics(
    int shOrder,
    Vector3[] sampleLocations,
    Vector3[] sampleNormals,
    PrtBuffer data
);
C++ public:
void ComputeSurfSamplesDirectSphericalHarmonics(
    int shOrder,
    array<Vector3>^ sampleLocations,
    array<Vector3>^ sampleNormals,
    PrtBufferdata
);
JScript public function ComputeSurfSamplesDirectSphericalHarmonics(
    shOrder : int,
    sampleLocations : Vector3[],
    sampleNormals : Vector3[],
    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.
sampleLocations Microsoft.DirectX.Vector3[]
Position for each sample.
sampleNormals Microsoft.DirectX.Vector3[]
Normal vector for each sample location.
data Microsoft.DirectX.Direct3D.PrtBuffer
Output PrtBuffer object that models the direct lighting contribution to the point, using the SH approximation.

Remarks

Do not use a texture buffer when calling this method.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

OutOfMemoryExceptionLeave Site

Microsoft Direct3D could not allocate sufficient memory to complete the call.