ID3DXPRTEngine::MultiplyAlbedo

Multiplies each precomputed radiance transfer (PRT) vector by the per-vertex albedo.

HRESULT MultiplyAlbedo(
  LPD3DXPRTBUFFER pDataOut
);

Parameters

pDataOut
[in, out] Pointer to an output ID3DXPRTBuffer object that will contain PRT vectors multiplied by the per-vertex albedo. If this output buffer is a texture object, then care must be taken to store the albedo of the texture at the same resolution as the simulation buffer. You can set the proper resolution on the albedo with D3DXLoadSurfaceFromSurface, applying texture gutter regions if appropriate.

Return Values

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

Remarks

The ID3DXPRTEngine::Computexxx methods compute output buffers in which the light signal has not been multiplied by albedo. 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.

To include albedo in the rendered-light model, call this method after one of the Computexxx methods.

ID3DXPRTEngine::SetMeshMaterials should be called before calling this method.

Requirements

Header: Declared in D3dx9mesh.h.

See Also

ID3DXPRTEngine::ComputeDirectLightingSH