🎉 Add pixel wipe effect

This commit is contained in:
Simon Schneegans
2022-09-02 06:07:48 +02:00
parent 2db13ea884
commit d746344c76
10 changed files with 475 additions and 6 deletions
+3 -3
View File
@@ -27,9 +27,9 @@ void main() {
vec4 oColor = getInputColor(texcoord);
// Hide selected pixels based on some random noise.
float random = simplex2DFractal(texcoord * uNoise * uSize / 1000.0);
if (random * 1.5 - 0.25 < progress) {
oColor.a = 0.0;
float random = simplex2DFractal(texcoord * uNoise * uSize / 1000.0) * 1.5 - 0.25;
if (progress > random) {
oColor.a *= max(0.0, 1.0 - (progress - random) * 20.0);
}
setOutputColor(oColor);