From d4a483e6560e4a082c93a5befe2da1460343e6e4 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 5 Feb 2024 18:42:09 +0100 Subject: [PATCH] Add missing check for `FormatSupport::TextureCube` for shadowmap --- Source/Engine/Renderer/ShadowsPass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Renderer/ShadowsPass.cpp b/Source/Engine/Renderer/ShadowsPass.cpp index a4c69c8af..19a91eeae 100644 --- a/Source/Engine/Renderer/ShadowsPass.cpp +++ b/Source/Engine/Renderer/ShadowsPass.cpp @@ -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;