diff --git a/shaders/twister.fs b/shaders/twister.fs index 3f81c7c..9e560c5 100644 --- a/shaders/twister.fs +++ b/shaders/twister.fs @@ -8,19 +8,19 @@ in vec2 vsoTexCoord; out vec4 fragColor; // Fonction de déformation -vec2 deform(float progression) { +vec2 deform(float it) { vec2 center = vec2(0.5); vec2 offset = vsoTexCoord - center; // Torsion - float angle = offset.y * progression * radians(180) * 2; + float angle = offset.y * it * radians(180) * 2; float cosTheta = cos(angle); float sinTheta = sin(angle); vec2 twistedOffset = vec2(cosTheta * offset.x - sinTheta * offset.y, sinTheta * offset.x + cosTheta * offset.y); // Vague float wave = sin(twistedOffset.y * 20); - vec2 deformedUV = twistedOffset + vec2(wave * progression, 0); + vec2 deformedUV = twistedOffset + vec2(wave * it, 0); return center + deformedUV; }