Refactor scene rendering to use batched culling for main view and shadow projections

This commit is contained in:
Wojtek Figat
2022-10-28 09:13:28 +02:00
parent e217d5e79b
commit eb52d333ae
44 changed files with 1064 additions and 514 deletions

View File

@@ -63,12 +63,12 @@ void TAA::Dispose()
_shader = nullptr;
}
bool TAA::NeedMotionVectors(RenderContext& renderContext)
bool TAA::NeedMotionVectors(const RenderContext& renderContext)
{
return renderContext.List->Settings.AntiAliasing.Mode == AntialiasingMode::TemporalAntialiasing;
}
void TAA::Render(RenderContext& renderContext, GPUTexture* input, GPUTextureView* output)
void TAA::Render(const RenderContext& renderContext, GPUTexture* input, GPUTextureView* output)
{
auto context = GPUDevice::Instance->GetMainContext();

View File

@@ -22,7 +22,7 @@ public:
/// </summary>
/// <param name="renderContext">The rendering context.</param>
/// <returns>True if need to render motion vectors, otherwise false.</returns>
static bool NeedMotionVectors(RenderContext& renderContext);
static bool NeedMotionVectors(const RenderContext& renderContext);
/// <summary>
/// Performs AA pass rendering for the input task.
@@ -30,7 +30,7 @@ public:
/// <param name="renderContext">The rendering context.</param>
/// <param name="input">The input render target.</param>
/// <param name="output">The output render target.</param>
void Render(RenderContext& renderContext, GPUTexture* input, GPUTextureView* output);
void Render(const RenderContext& renderContext, GPUTexture* input, GPUTextureView* output);
private: