forgor duration?

This commit is contained in:
elwrcl committed 2026-09-03 02:30:44 +03:00
1 parent beebcce70c
commit b94681056c
1 file changed
+3 -1
+3 -1
View File
@@ -1,7 +1,8 @@
///degauss.glsl ///degauss.glsl
const float BOOT_DELAY = 0.45; const float BOOT_DELAY = 0.45;
const float DURATION = 1.0;
// How hard the coil hits. // how hard the coil hits.
const float WOBBLE_AMP = 0.055; const float WOBBLE_AMP = 0.055;
const float WAVE_FREQ = 9.0; const float WAVE_FREQ = 9.0;
const float WAVE_SPEED = 3.2; const float WAVE_SPEED = 3.2;
@@ -25,6 +26,7 @@ float envelope(float t) {
float tail = 1.0 - k * k * k * k; float tail = 1.0 - k * k * k * k;
return attack * ring * tail; return attack * ring * tail;
} }
float coilPhase(float t) { float coilPhase(float t) {
float k = clamp(t / DURATION, 0.0, 1.0); float k = clamp(t / DURATION, 0.0, 1.0);
return WAVE_SPEED * t * (1.0 - 0.5 * WAVE_GLIDE * k); return WAVE_SPEED * t * (1.0 - 0.5 * WAVE_GLIDE * k);