D3DXCreatePRTBufferTex function
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.
Syntax
HRESULT D3DXCreatePRTBufferTex(
_In_ UINT Width,
_In_ UINT Height,
_In_ UINT NumCoeffs,
_In_ UINT NumChannels,
_Inout_ LPD3DXPRTBUFFER *ppBuffer
);
Parameters
-
Width [in]
-
Type: UINT
Width of the texture, in pixels.
-
Height [in]
-
Type: UINT
Height of the texture, in pixels.
-
NumCoeffs [in]
-
Type: UINT
Number of coefficients per sample location. When using spherical harmonic (SH) PRT, the number of coefficients should be OrderĀ², 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]
-
Type: UINT
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]
-
Type: LPD3DXPRTBUFFER*
Address of a pointer to the created ID3DXPRTBuffer object.
Return value
Type: HRESULT
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
Requirement | Value |
---|---|
Header |
|
Library |
|
See also