Merge remote-tracking branch 'origin/master' into 1.9
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user