🎉 Add shift parameter to glide effect [generate-references]

This commit is contained in:
Simon Schneegans
2022-11-08 20:57:12 +01:00
parent 2d930d688c
commit 737e9d3340
9 changed files with 178 additions and 4 deletions
+4
View File
@@ -17,6 +17,7 @@
uniform float uScale;
uniform float uSquish;
uniform float uTilt;
uniform float uShift;
void main() {
// We reverse the progress for window opening.
@@ -35,6 +36,9 @@ void main() {
// 'Tilt' image texture around x-axis.
coords.x /= mix(1.0, 1.0 - 0.1 * uTilt * coords.y, progress);
// Move image texture vertically.
coords.y += uShift * progress;
// Move texture coordinate center to corner again.
coords = coords * 0.5 + 0.5;