I want to apply PCF for my shadows and for that I need to set my shadow map texture format to DXGI_FORMAT_R24_UNORM_X8_TYPELESS
. After setting I cannot run my program , it crashes without any errors. I think the reason is that my GPU dont suppotrs that format and for that I want to check for format support. See enter link description here
Here is my code
UINT pSup;
result = device->CheckFormatSupport(DXGI_FORMAT_R24_UNORM_X8_TYPELESS,&pSup);
if (result != S_OK)
{
MessageBox(NULL, L"Dont support that format", L"Error", MB_OK);
}
But How to work with pSup
. I need to check if it supports D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON
, D3D11_FORMAT_SUPPORT_RENDER_TARGET
and D3D11_FORMAT_SUPPORT_DEPTH_STENCIL
.
See also enter link description here