ultraviolet icon indicating copy to clipboard operation
ultraviolet copied to clipboard

Left handed Vulkan Y Down is (possibly) incorrect

Open hYdos opened this issue 2 years ago • 2 comments

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

hYdos avatar Sep 23 '23 03:09 hYdos

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 avatar Sep 23 '23 21:09 fu5ha

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

fu5ha avatar Sep 23 '23 22:09 fu5ha