Reimplement cascaded shadow maps blending via dithering

This commit is contained in:
Wojtek Figat
2024-04-05 10:59:34 +02:00
parent 8bd409e95d
commit 0cc6669cbd
11 changed files with 46 additions and 52 deletions

View File

@@ -552,6 +552,14 @@ void RenderTools::ComputeCascadeUpdateFrequency(int32 cascadeIndex, int32 cascad
}
}
float RenderTools::ComputeTemporalTime()
{
const float time = Time::Draw.UnscaledTime.GetTotalSeconds();
const float scale = 10;
const float integral = roundf(time / scale) * scale;
return time - integral;
}
void RenderTools::CalculateTangentFrame(FloatR10G10B10A2& resultNormal, FloatR10G10B10A2& resultTangent, const Float3& normal)
{
// Calculate tangent