Skip to content

How to render text upside-down? - asked by @PPakalns #25

Closed Answered by Blatko1
Blatko1 asked this question in Q&A

You must be logged in to vote

As I understand, you want to make your text look flipped or, in other words, upside down. Did I understand correctly?
You can use that alternate version of the shader you linked, which turns every quad upside-down, but the character alignment will look a bit off - or you can use the modified version of the orthogonal matrix. I have tried experimenting a little with the orthogonal matrices by changing matrix element signs (minuses to pluses and the other way around) and have found that you can make your text look upside-down if you make your matrix look like this:

    [
        [-2.0 / view_width, 0.0,               0.0, 0.0],
        [0.0,               2.0 / view_height, 0.0, 0.0],
        

Replies: 1 comment 1 reply

Blatko1
Nov 22, 2023
Maintainer Author

You must be logged in to vote
1 reply
@PPakalns

Answer selected by Blatko1
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