Skip to content

What is the usage of translations in the ScalingMatrix? #371

Answered by parasyte
Blatko1 asked this question in Q&A
Discussion options

You must be logged in to vote

Specifically, tx and ty are for translation. If the surface is an odd number of pixels in either direction, these variables will nudge the triangle by half a pixel so that the pixels in the triangle align with pixels on the physical screen.

Without them, you would get an ugly half-pixel offset. See #231.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Blatko1
Comment options

@parasyte
Comment options

Answer selected by Blatko1
@Blatko1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants