D3DXCreatePRTBufferTex
Creates a precomputed radiance transfer (PRT) buffer that can be compressed or filled by a simulator. This function should be used to create per-pixel buffers.
HRESULT D3DXCreatePRTBufferTex(
UINT Width,
UINT Height,
UINT NumCoeffs,
UINT NumChannels,
LPD3DXPRTBUFFER * ppBuffer
);
Parameters
- Width
- [in] Width of the texture, in pixels.
- Height
- [in] Height of the texture, in pixels.
- NumCoeffs
- [in] Number of coefficients per sample location. When using spherical harmonic (SH) PRT, the number of coefficients should be Order2, where Order is the order of the SH evaluation. Order must be in the range of D3DXSH_MINORDER to D3DXSH_MAXORDER, inclusive. The degree of the evaluation is Order - 1.
- NumChannels
- [in] Number of color channels to set in the mesh. Set to 1 to specify gray materials (R = G = B), or 3 to enable color bleeding effects.
- ppBuffer
- [in, out] Address of a pointer to the created ID3DXPRTBuffer object.
Return Values
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
Remarks
When the buffer is created, all values are initialized to zero.
Requirements
Header: Declared in D3dx9mesh.h.
See Also
D3DXCreatePRTBuffer