From 53cdecf6f0b28f1556e6baa9c5a4a8e8139f541b Mon Sep 17 00:00:00 2001 From: Laurens Voerman Date: Wed, 2 Feb 2022 16:19:11 +0100 Subject: [PATCH] Keep images aligned to screen. Solves issue #231. --- pixplot/web/index.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pixplot/web/index.html b/pixplot/web/index.html index 0c3e68fe..a45eb16b 100644 --- a/pixplot/web/index.html +++ b/pixplot/web/index.html @@ -125,12 +125,11 @@ p = p * s; // translate the cell; translation = current; targetTranslation = destination - vec3 p0 = p + translation; - vec3 p1 = p + targetTranslation; - vec3 pos = mix(p0, p1, percent); - + vec3 pos = mix(translation, targetTranslation, percent); + //pos += p; // get the ultimate cell position vec4 world = modelViewMatrix * vec4(pos, 1.0); + world += vec4(p, 1.0); gl_Position = projectionMatrix * world; }