Skip to content
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

Left handed Vulkan Y Down is (possibly) incorrect #162

Open
hYdos opened this issue Sep 23, 2023 · 2 comments
Open

Left handed Vulkan Y Down is (possibly) incorrect #162

hYdos opened this issue Sep 23, 2023 · 2 comments

Comments

@hYdos
Copy link

hYdos commented Sep 23, 2023

Through a few days of debugging, I found that ultraviolet::projection::rh_ydown::perspective_vk appears to be wrong and had to write my own projection code to make my projection display correctly.

Here is the commit where i replaced the code and had it work for comparison

@fu5ha
Copy link
Owner

fu5ha commented Sep 23, 2023

Are you sure you're interpreting rh_ydown correctly? Using rh_ydown::perspective_vk is meant to map from a source (i.e. your application's conventions) coordinate space of right-handed and y-down (+X points right, +Y points down, +Z points away from the viewer) into vulkan's clip space which is also right-handed and y-down. From a basic inspection, the commit you linked uses a matrix that would map from a source space which is at least y-up into vulkan's y-down.

@fu5ha
Copy link
Owner

fu5ha commented Sep 23, 2023

I've revamped the docs of the projection module and its submodules in 13fc94f, let me know if that makes it more clear. And if you still have troubles there indeed may be a bug...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants