diff --git a/Source/Engine/Renderer/Renderer.cpp b/Source/Engine/Renderer/Renderer.cpp index 7b09f73ee..31e013fd0 100644 --- a/Source/Engine/Renderer/Renderer.cpp +++ b/Source/Engine/Renderer/Renderer.cpp @@ -542,7 +542,7 @@ void RenderInner(SceneRenderTask* task, RenderContext& renderContext, RenderCont // Get the light accumulation buffer auto outputFormat = renderContext.Buffers->GetOutputFormat(); auto tempFlags = GPUTextureFlags::ShaderResource | GPUTextureFlags::RenderTarget; - if (GPUDevice::Instance->Limits.HasCompute) + if (GPUDevice::Instance->Limits.HasCompute && EnumHasAllFlags(GPUDevice::Instance->GetFormatFeatures(outputFormat).Support, FormatSupport::UnorderedAccessReadOnly | FormatSupport::UnorderedAccessWriteOnly)) tempFlags |= GPUTextureFlags::UnorderedAccess; auto tempDesc = GPUTextureDescription::New2D(renderContext.Buffers->GetWidth(), renderContext.Buffers->GetHeight(), outputFormat, tempFlags); auto lightBuffer = RenderTargetPool::Get(tempDesc);