diff --git a/Source/Engine/Renderer/ForwardPass.cpp b/Source/Engine/Renderer/ForwardPass.cpp
index 42796764f..caf624609 100644
--- a/Source/Engine/Renderer/ForwardPass.cpp
+++ b/Source/Engine/Renderer/ForwardPass.cpp
@@ -72,7 +72,7 @@ void ForwardPass::Dispose()
_shader = nullptr;
}
-void ForwardPass::Render(RenderContext& renderContext, GPUTexture* input, GPUTexture* output)
+void ForwardPass::Render(RenderContext& renderContext, GPUTexture*& input, GPUTexture*& output)
{
PROFILE_GPU_CPU("Forward");
auto context = GPUDevice::Instance->GetMainContext();
@@ -91,6 +91,16 @@ void ForwardPass::Render(RenderContext& renderContext, GPUTexture* input, GPUTex
// Check if there is no objects to render or no resources ready
auto& forwardList = mainCache->DrawCallsLists[(int32)DrawCallsListType::Forward];
auto& distortionList = mainCache->DrawCallsLists[(int32)DrawCallsListType::Distortion];
+ if ((forwardList.IsEmpty() && distortionList.IsEmpty())
+#if USE_EDITOR
+ || renderContext.View.Mode == ViewMode::PhysicsColliders
+#endif
+ )
+ {
+ // Skip rendering
+ Swap(input, output);
+ return;
+ }
if (distortionList.IsEmpty() || checkIfSkipPass())
{
// Copy frame
diff --git a/Source/Engine/Renderer/ForwardPass.h b/Source/Engine/Renderer/ForwardPass.h
index 552052eb1..be3126e0e 100644
--- a/Source/Engine/Renderer/ForwardPass.h
+++ b/Source/Engine/Renderer/ForwardPass.h
@@ -31,7 +31,7 @@ public:
/// The rendering context.
/// Target with renderer frame ready for further processing.
/// The output frame.
- void Render(RenderContext& renderContext, GPUTexture* input, GPUTexture* output);
+ void Render(RenderContext& renderContext, GPUTexture*& input, GPUTexture*& output);
private: