Get the sampler names referenced in a shader.
HRESULT D3DXGetShaderSamplers( CONST DWORD* pFunction, LPCSTR* pSamplers, UINT* pCount );
To find the number of samplers used, check pCount after calling D3DXGetShaderSamplers with pSamplers = NULL.
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, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.
Header: Declared in D3dx9shader.h.