Revert "Remove unused LodProxyView feature from RenderContext (shadow projections are using the same draw batch as main view now)"

This reverts commit c33fe04645.
This commit is contained in:
Wojtek Figat
2022-11-26 20:37:04 +01:00
parent bdb27fef1b
commit 39dc439cd8
6 changed files with 18 additions and 5 deletions

View File

@@ -75,7 +75,8 @@ void Decal::Draw(RenderContext& renderContext)
Material->IsLoaded() &&
Material->IsDecal())
{
const float screenRadiusSquared = RenderTools::ComputeBoundsScreenRadiusSquared(_sphere.Center - renderContext.View.Origin, (float)_sphere.Radius, renderContext.View) * renderContext.View.ModelLODDistanceFactorSqrt;
const auto lodView = (renderContext.LodProxyView ? renderContext.LodProxyView : &renderContext.View);
const float screenRadiusSquared = RenderTools::ComputeBoundsScreenRadiusSquared(_sphere.Center - renderContext.View.Origin, (float)_sphere.Radius, *lodView) * renderContext.View.ModelLODDistanceFactorSqrt;
// Check if decal is being culled
if (Math::Square(DrawMinScreenSize * 0.5f) > screenRadiusSquared)