I know that and the same thing, I left to add a multiplier in the future.
As I reduced the image by 2x, I have to move 1/2. But it didn’t work, bro.
For some reason it keeps going to the left
you have old resolution 1500,900 and you need read centered pixels 3 times zoomed so you read between 500 - 1000 on X and 300 - 600 on Y… Center is 750,450 so just make 750 - 1500 = -750 what is start offset from center and divide it by “thr” so -750 / 3 = -250. Now you know where start on X when you zoomed 3x and you starting on 750 + (-250) = 500 as on your picture
Texture UVs in a shader are normalized to a 0.0 to 1.0 range on the x and y. (0.0, 0.0) is the bottom left, (1.0, 1.0) is the top right. Multiplying 0.0 by any value is 0.0, so it doesn’t change, hence the zoom into the corner. If you want to zoom into the center, the easiest way to do that by offsetting the UVs by 0.5 so that (0.0, 0.0) is now the center, multiplying, and then counter offsetting by 0.5 afterwards.