Microsoft DirectX 9.0 SDK Update (October 2004)

PrtEngine.ComputeSubsurfaceScattering Method

Language:

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

Computes the source radiance resulting from subsurface scattering, using material properties set by PrtEngine.SetMeshMaterials. This method can be used only for materials defined per-vertex in a mesh object.

Definition

Visual Basic .NET Public Sub ComputeSubsurfaceScattering( _
    ByVal bufferIn As PrtBuffer, _
    ByVal bufferOut As PrtBuffer, _
    ByVal dataComputed As PrtBuffer _
)
C# public void ComputeSubsurfaceScattering(
    PrtBuffer bufferIn,
    PrtBuffer bufferOut,
    PrtBuffer dataComputed
);
Managed C++ public: void ComputeSubsurfaceScattering(
    PrtBuffer *bufferIn,
    PrtBuffer *bufferOut,
    PrtBuffer *dataComputed
);
JScript .NET public function ComputeSubsurfaceScattering(
    bufferIn : PrtBuffer,
    bufferOut : PrtBuffer,
    dataComputed : PrtBuffer
);

Parameters

bufferIn Microsoft.DirectX.Direct3D.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.
bufferOut Microsoft.DirectX.Direct3D.PrtBuffer. 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.
dataComputed Microsoft.DirectX.Direct3D.PrtBuffer. A PrtBuffer object that is the running sum of all previous bufferOut outputs.

Remarks

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 precomputed radiance transfer (PRT) vector by the albedo.

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.


© 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