Add flicker effect to chrome (replaces zooms)

This commit is contained in:
elasota
2020-05-18 03:30:25 -04:00
parent 5c07ce08bb
commit 8135c68c49
11 changed files with 292 additions and 63 deletions

View File

@@ -1,4 +1,19 @@
cbuffer SDrawQuadPixelConstants : register(b0)
{
float4 constants_Modulation;
int2 constants_FlickerAxis;
int constants_FlickerStartThreshold;
int constants_FlickerEndThreshold;
};
float4 ApplyFlicker(int2 coordinate, float4 color)
{
int flickerTotal = dot(constants_FlickerAxis, coordinate);
if (flickerTotal < constants_FlickerStartThreshold)
return float4(0, 0, 0, 0);
else if (flickerTotal >= constants_FlickerEndThreshold)
return color;
else
return float4(1, 1, 1, 1);
}