Uses the GPU to compute the direct lighting contribution to 3D objects where the source radiance is represented by a spherical harmonic (SH) approximation. Computing the lighting on the GPU will generally be much faster than on the CPU.
HRESULT ComputeDirectLightingSHGPU( LPDIRECT3DDEVICE9 pDevice, UINT Flags, UINT Order, FLOAT ZBias, FLOAT ZAngleBias, LPD3DXPRTBUFFER pDataOut );
Note Callback functions should not use the IDirect3DDevice9 device object used by the GPU simulator.
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
In this method, the albedo is not multiplied by the light signal, and only incoming light is integrated in the simulator. 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.
Call ID3DXPRTEngine::MultiplyAlbedo to multiply each precomputed radiance transfer (PRT) vector by the albedo.
Header: Declared in D3dx9mesh.h.