![]() |
![]() |
![]() |
Multiplies each precomputed radiance transfer (PRT) vector by the per-vertex albedo.
Syntax
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 Value
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 The method call is invalid. For example, a method's parameter may have an invalid value. E_OUTOFMEMORY Microsoft Direct3D could not allocate sufficient memory to complete the call.
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.
See Also
ID3DXPRTEngine::ComputeDirectLightingSH