-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
Fix y inversion on examples #638
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for PR, camera's Y sure is messed up! |
Okay, I'll look on related issues |
I've done some research and found 3 issues related to this problem: #171, #578 and #618. After reading code of the examples that use Although, I think that drawing into camera has issue on miniquad side when |
After looking at code of triangle example in miniquad I've found that in miniquad higher values of y means higher position on screen, whereas in macroquad higher values of y means lower position in screen. So we need to flip y axis to do correct drawing. For the default camera it is done by The only problem for now is that if we want to draw on render target it's drawn upside down. Currently this PR fixes issues #171, #578, #618: default camera is correct, examples drawn correctly. Also, zoom for camera can be set intuitively without rotating y ( @not-fl3 I suppose this PR should be merged as is, I'll continue to work on render target issue on the miniquad side. |
So, I'm aware this was supposed to fix Y inversion but it used to work for me with zero issues. I'm now running the platformer example (copied into my own project with now changes) and it's inverted... In the past when I ran this example (quite a while ago) things were fine. But I've noticed that it's upside down for me now. |
NOTE: I'm on Fedora 38, BSPWM, X11, Nvidia drivers. |
@BenMcAvoy Thanks for the running. So as I understood, if you run Can you also try |
Well, that's strange that with NOTE: I've noticed that you've said
... but there is no changes to |
Ah, sorry. I pulled changes and everything is working great! Platformer example isn't flipped and neither is letterbox on your branch ( |
Could this get merged? The current flip is quite confusing and this fix seems sound. |
This could be merged, but I am a little confused on how those axises should behave myself and where it is supposed to be up or down. I want to collect all the questionable cases somewhere (maybe here? https://github.com/not-fl3/quadtest) before merging this. but I am super slow with that :| |
When building project with current macroquad version I'd found issue with camera. When a camera is set, the screen got inverted y.
After that I've found #618 and checked other examples. I've found that not only platformer has inverted y, but also tree and arkanoid. This examples use
Camera2D
just like the platfornmer example. I've checkedCamera2D
code and found this inversion if not drawn on render target.Am I right to remove inversion or this issues should be fixed other way?