temporal effects

This commit is contained in:
2026-05-02 19:23:03 +10:00
parent 2a0eea936d
commit 1d9bf151ce
13 changed files with 786 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
float4 shadeVideo(ShaderContext context)
{
float4 history0 = sampleTemporalHistory(1, context.uv);
float4 history1 = sampleTemporalHistory(3, context.uv);
float4 history2 = sampleTemporalHistory(5, context.uv);
float4 trail = history0 * 0.5 + history1 * 0.3 + history2 * 0.2;
float trailAmount = clamp(trailMix, 0.0, 1.0);
float currentAmount = clamp(currentMix, 0.0, 1.0);
float weightSum = max(0.0001, currentAmount + trailAmount);
return saturate((context.sourceColor * currentAmount + trail * trailAmount) / weightSum);
}