0
$\begingroup$

My world has the base unit of 1024. Each tile is 1024x1024 units. When the camera is at the center of a tile, the tile ranges from -512 to 512 in view space (no rotation).

Does it make sense (and is it even possible) to compose a view matrix that "scales" the unit in such a way that [0,1024] maps to [0,1]? If the Camera is at the center of a tile, the tile should range from -0.5 to 0.5 in view space.

I would prefer to not scale the world matrices of objects.

$\endgroup$
3
  • $\begingroup$ Are you using a projection matrix as well? Usually this is the point where you can scale how much the camera shoud see... You can also scale the view matrix but in general the view matrix only stores the position and orientation of your camera $\endgroup$ Commented Jul 25, 2023 at 13:26
  • $\begingroup$ Yes, but I am computing stuff in view space and having small numbers makes the whole thing easier to grasp and debug to be honest. $\endgroup$ Commented Jul 25, 2023 at 13:42
  • 1
    $\begingroup$ You can apply a scale matrix after the view matrix. 3D: $\begin{pmatrix} Scale_x& 0 & 0 & 0\\ 0 & Scale_y& 0 & 0\\ 0 & 0 & Scale_z& 0\\ 0 & 0 & 0 & 1 \end{pmatrix}$ 2D: $\begin{pmatrix} Scale_x& 0 & 0\\ 0 & Scale_y& 0\\ 0 & 0 & 1 \end{pmatrix}$ $\endgroup$ Commented Jul 25, 2023 at 15:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.