Add missing check for FormatSupport::TextureCube for shadowmap

This commit is contained in:
Wojtek Figat
2024-02-05 18:42:09 +01:00
parent 1d4bb7a4f4
commit d4a483e656

View File

@@ -89,7 +89,7 @@ bool ShadowsPass::Init()
const auto formatTexture = PixelFormatExtensions::FindShaderResourceFormat(format, false);
const auto formatFeaturesDepth = GPUDevice::Instance->GetFormatFeatures(format);
const auto formatFeaturesTexture = GPUDevice::Instance->GetFormatFeatures(formatTexture);
if (EnumHasAllFlags(formatFeaturesDepth.Support, FormatSupport::DepthStencil | FormatSupport::Texture2D) &&
if (EnumHasAllFlags(formatFeaturesDepth.Support, FormatSupport::DepthStencil | FormatSupport::Texture2D | FormatSupport::TextureCube) &&
EnumHasAllFlags(formatFeaturesTexture.Support, FormatSupport::ShaderSample | FormatSupport::ShaderSampleComparison))
{
_shadowMapFormat = format;