Closed Erfan-Ahmadi closed 2 years ago
Idea for a test.
Write some sort of a clear mathematical gradient/image defined as a function f(x,y)
(the toy path tracer in compute is actually good enough).
imageStore(swapchainImage,ivec2(x,y),vec4(f(x,y),1.f))
Should yield identical images in Renderdoc debug (if not, find out why).
Then find out if presenting the swapchain on Vulkan flips the image compared to Renderdoc debug.
Then come up with a way to make OpenGL present behave same way as Vulkan.
Describe the bug
OpenGL and Vulkan different coordinate systems for framebuffers and clip coordinates cause y-flipped images and inconsistenty in swapchains.
NOTE: We do glClipControl(GL_UPPER_LEFT, GL_ZERO_TO_ONE) in GL
Steps to Reproduce
Example 09 run on both gl and vk and you'll see y is inverted
Expected vs observed behavior
Both APIs for examples should be consistent