Merge remote-tracking branch 'origin/master' into 1.9

This commit is contained in:
Wojtek Figat
2024-08-05 20:00:39 +02:00
52 changed files with 983 additions and 131 deletions

View File

@@ -670,6 +670,17 @@ void GlobalSurfaceAtlasPass::Dispose()
_shader = nullptr;
}
bool GlobalSurfaceAtlasPass::Get(const RenderBuffers* buffers, BindingData& result)
{
auto* surfaceAtlasData = buffers ? buffers->FindCustomBuffer<GlobalSurfaceAtlasCustomBuffer>(TEXT("GlobalSurfaceAtlas")) : nullptr;
if (surfaceAtlasData && surfaceAtlasData->LastFrameUsed + 1 >= Engine::FrameCount) // Allow to use Surface Atlas from the previous frame (not used currently)
{
result = surfaceAtlasData->Result;
return false;
}
return true;
}
void GlobalSurfaceAtlasPass::OnCollectDrawCalls(RenderContextBatch& renderContextBatch)
{
// Check if Global Surface Atlas will be used this frame