ID3DXPRTEngine::SetSamplingInfo method

Sets sampling properties used by the precomputed radiance transfer (PRT) simulator.

Syntax

HRESULT SetSamplingInfo(
  [in] UINT  NumRays,
  [in] BOOL  UseSphere,
  [in] BOOL  UseCosine,
  [in] BOOL  Adaptive,
  [in] FLOAT AdaptiveThresh
);

Parameters

NumRays [in]

Type: UINT

Number of light rays to direct at each sample. Must be greater than zero.

UseSphere [in]

Type: BOOL

If TRUE, samples will be computed over a full sphere. If FALSE, samples will be computed over a hemisphere.

UseCosine [in]

Type: BOOL

If TRUE, use a cosine weighting of samples. If both UseCosine and UseSphere are TRUE, the method will fail and an error will be returned.

Adaptive [in]

Type: BOOL

Must be FALSE. Adaptive sampling is currently not implemented.

AdaptiveThresh [in]

Type: FLOAT

Ignored.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_NOTIMPL, E_OUTOFMEMORY.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

ID3DXPRTEngine