PrtEngine.ComputeSubsurfaceScatteringAdaptive(PrtBuffer,Single,Single,Int32,PrtBuffer,PrtBuffer) Method (Microsoft.DirectX.Direct3D)
Computes a transfer vector that maps source radiance to exit radiance resulting from subsurface scattering, using adaptive sampling and material properties set by PrtEngine.SetMeshMaterials. The method generates new vertices and faces on the mesh to more accurately approximate the precomputed radiance transfer (PRT) signal. This method can be used only for materials defined per-vertex in a mesh object.
Visual Basic Public Sub ComputeSubsurfaceScatteringAdaptive( _
ByVal bufferIn As PrtBuffer, _
ByVal adaptiveThresh As Single, _
ByVal minEdgeLength As Single, _
ByVal maxSubdiv As Integer, _
ByVal bufferOut As PrtBuffer, _
ByVal dataComputed As PrtBuffer _
C# public void ComputeSubsurfaceScatteringAdaptive(
JScript public function ComputeSubsurfaceScatteringAdaptive(
bufferIn : PrtBuffer,
adaptiveThresh : float,
minEdgeLength : float,
maxSubdiv : int,
bufferOut : PrtBuffer,
dataComputed : PrtBuffer
A PrtBuffer object that represents the 3-D object from the previous light bounce. This input buffer must have the proper number of color channels allocated for the simulation.
Threshold on the PRT vector to use for subdividing mesh vertices and faces. If less than 1e-6f, a default value of 1e-6f is specified.
Minimum face edge length that will be generated in adaptive sampling. If the method determines that the value is too small, a model-dependent value is specified.
Maximum level of subdivision of a face that will be used in adaptive sampling. If zero, a default value of 4 is specified.
A PrtBuffer object that models a single bounce of the subsurface-scattered light. This output buffer must have the proper number of color channels allocated for the simulation.
A PrtBuffer object that is the running sum of all previous bufferOut outputs.
To model subsurface scattering, call this method for each bounce after a PrtEngine.ComputeDirectLighting... method is called.
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 PRT vector by the albedo.
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.