Merge branch 'master' into 1.11

This commit is contained in:
Wojtek Figat
2025-06-05 18:03:17 +02:00
189 changed files with 4627 additions and 1426 deletions

View File

@@ -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

View File

@@ -31,7 +31,7 @@ public:
/// <param name="renderContext">The rendering context.</param>
/// <param name="input">Target with renderer frame ready for further processing.</param>
/// <param name="output">The output frame.</param>
void Render(RenderContext& renderContext, GPUTexture* input, GPUTexture* output);
void Render(RenderContext& renderContext, GPUTexture*& input, GPUTexture*& output);
private:

View File

@@ -240,6 +240,12 @@ void Renderer::Render(SceneRenderTask* task)
| ViewFlags::ContactShadows
| ViewFlags::DepthOfField);
}
// Force Debug Draw usage in some specific views that depend on it
if (renderContext.View.Mode == ViewMode::PhysicsColliders)
{
renderContext.View.Flags |= ViewFlags::DebugDraw;
}
#endif
// Perform the actual rendering