D3DXCreatePRTBuffer
Creates a precomputed radiance transfer (PRT) buffer that can be compressed or filled by a simulator. This function should be used to create per-vertex or volume buffers.
HRESULT D3DXCreatePRTBuffer(
UINT NumSamples,
UINT NumCoeffs,
UINT NumChannels,
LPD3DXPRTBUFFER * ppBuffer
);
Parameters
- NumSamples
- [in] Number of vertices (or texels) sampled.
- 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 S_OK. If the function fails, the return value can be one of these: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
Remarks
When the buffer is created, all values are initialized to zero.
Requirements
Header: Declared in D3dx9mesh.h.
See Also
D3DXCreatePRTBufferTex