Shaders zoom uniform adjusts translation speed

I’m new to shaders and can’t tell why when I multiply the zoom factor the panning speeds up and slows down depending on how much the zoom value is. Well I have an idea why it’s happening but have no clue how to prevent it. I want the panning to be the same but the ability to zoom from the center of the screen. Anyone know how to help?
(I utilized Pixi.js on this CodeSandbox example to get it up and running faster, will port to three.js later)

dragOffset.x += deltaX * zoomFactor;
dragOffset.y += deltaY * zoomFactor;

I guess I was just looking in the wrong place, thinking this was a GLSL problem. Completely oversaw this, thank you!

1 Like