d3d9.dllComputeBounceAdaptive
Microsoft DirectX 9.0 SDK Update (October 2004)

ID3DXPRTEngine::ComputeBounceAdaptive Method


Computes the source radiance resulting from a single bounce of interreflected light, using adaptive sampling. This method generates new vertices and faces on the mesh to more accurately approximate the precomputed radiance transfer (PRT) signal. This method can be used for any lit scene, including a spherical harmonic (SH)-based PRT model.

Syntax

HRESULT ComputeBounceAdaptive(      

    LPD3DXPRTBUFFER pDataIn,     FLOAT AdaptiveThresh,     FLOAT MinEdgeLength,     UINT MaxSubdiv,     LPD3DXPRTBUFFER pDataOut,     LPD3DXPRTBUFFER pDataTotal );

Parameters

pDataIn
[in] Pointer to an input ID3DXPRTBuffer 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.
AdaptiveThresh
[in] 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.
MinEdgeLength
[in] 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. If zero, a default value of 4 is specified.
MaxSubdiv
[in] Maximum level of subdivision of a face that will be used in adaptive sampling.
pDataOut
[in, out] Pointer to an output ID3DXPRTBuffer object. This output buffer must have the proper number of color channels allocated for the simulation.
pDataTotal
[in, out] Pointer to an optional ID3DXPRTBuffer object that keeps a running sum of pDataOut with each light bounce computation. May be NULL.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following:

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
E_OUTOFMEMORYMicrosoft Direct3D could not allocate sufficient memory to complete the call.




© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.