-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera/Screen transformation support #87
Conversation
This is useful when world coordinate axis are flipped or when text clipping is not needed due to text being attached to the world. |
Thank you! There's some unresolved conversation about this in #64 though. I think we need to figure out a strategy (e..g, separate vector pipeline) that allows for crisp text for non-axis aligned transformations. e.g., transforming 45 degrees won't look great right now. The vector approach from iced might be a good way to do it though |
Thank you for your feedback. I would still suggest adding custom screen transformation matrix to the main pipeline too. This makes more simple to use this library in cases like:
Of course coordinate transformations could be done before calculating ScreenResolution, buffer text size, text position, but it is more complex. But still, it would be nice if Screen parameters (resolution/transformation buffer) could be moved to texture renderer so that:
Thank you for maintaining this library. |
Yeah it's definitely possible we might want to expose this in some way, although it's better to do this before if possible. The crates I'd definitely like to add some kind of vertical rendering (i.e., rotating exactly 90 degrees counterclockwise) to the existing renderer, but arbitrary transformations would benefit from some kind of separate vector renderer. |
Closing as #88 (support for reusing atlas for multi viewport rendering) was merged. Some transformations can be applied by transforming all coordinates before passing them into glyphon. |
Added some support for rendering text with custom 2D world transformations
#4
Moved transformation matrix buffer to text_renderer to allow rendering multiple transformations of text and to be able to reuse the same texture atlas for all operations.