🔧 Use uDuration instead of uTime

This commit is contained in:
Simon Schneegans
2022-06-10 07:30:44 +02:00
parent 0bd0fb27b9
commit 46a1729e54
9 changed files with 30 additions and 26 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ float getWisps(vec2 texCoords, float gridSize, vec2 seed) {
float radius = mix(0.5, 1.0, hash12(cellID * seed * 19.1249)) * WISPS_RADIUS;
float roundness = mix(-1.0, 1.0, hash12(cellID * seed * 7.51949));
vec2 offset = vec2(sin(speed * (uTime + 1)) * roundness, cos(speed * (uTime + 1)));
vec2 offset = vec2(sin(speed * (uProgress * uDuration + 1)) * roundness,
cos(speed * (uProgress * uDuration + 1)));
offset *= 0.5 - 0.5 * radius / gridSize;
offset = vec2(offset.x * cos(rotation) - offset.y * sin(rotation),
offset.x * sin(rotation) + offset.y * cos(rotation));