Fix Global Surface Atlas drawing of objects that are hidden in GBuffer pass but should be visible for GI

This commit is contained in:
Wojciech Figat
2022-08-09 14:37:29 +02:00
parent 210342d337
commit 6a1378ebdb
8 changed files with 13 additions and 7 deletions

View File

@@ -513,7 +513,7 @@ bool GlobalSurfaceAtlasPass::Render(RenderContext& renderContext, GPUContext* co
RenderContext renderContextTiles = renderContext;
renderContextTiles.List = RenderList::GetFromPool();
renderContextTiles.View.Pass = DrawPass::GBuffer;
renderContextTiles.View.Pass = DrawPass::GBuffer | DrawPass::GlobalSurfaceAtlas;
renderContextTiles.View.Mode = ViewMode::Default;
renderContextTiles.View.ModelLODBias += 100000;
renderContextTiles.View.ShadowModelLODBias += 100000;
@@ -582,7 +582,7 @@ bool GlobalSurfaceAtlasPass::Render(RenderContext& renderContext, GPUContext* co
// Fake projection matrix to disable Screen Size culling based on RenderTools::ComputeBoundsScreenRadiusSquared
renderContextTiles.View.Projection.Values[0][0] = 10000.0f;
// Collect draw calls for the object
object.Actor->Draw(renderContextTiles);