diff --git a/README.md b/README.md index 6e4bad1..c271fd8 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,16 @@ # Project -Run renderdoc on wayland: +## Notes + +1. Run renderdoc on wayland: ```console WAYLAND_DISPLAY= QT_QPA_PLATFORM=xcb qrenderdoc ``` > Not supported yet https://github.com/baldurk/renderdoc/issues/853 +2. [Difference Between OpenGL and Vulkan](./docs/OPENGL_VULKAN_DIFF.md) + ## Usefull links - https://vulkan-tutorial.com/fr/Introduction diff --git a/docs/OPENGL_VULKAN_DIFF.md b/docs/OPENGL_VULKAN_DIFF.md new file mode 100644 index 0000000..93d0855 --- /dev/null +++ b/docs/OPENGL_VULKAN_DIFF.md @@ -0,0 +1,11 @@ +# Difference between Vulkan and OpenGL + +Viewport: + +- Y axis is flipped like D3D +- Clipped Z axis is not [-1; 1] but [0; 1] + +![normalized viewport coordinates](./images/normalized_device_coordinates.svg) +![coord_sys](./images/coord_sys.png) + +See: [Vulkan Tutorial (Vertex step)](https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Shader_modules) and [VK_KHR_maintenance1 (Allow negative height)](https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_maintenance1.html#_description) diff --git a/docs/images/coord_sys.png b/docs/images/coord_sys.png new file mode 100644 index 0000000..6d195f6 Binary files /dev/null and b/docs/images/coord_sys.png differ diff --git a/docs/images/normalized_device_coordinates.svg b/docs/images/normalized_device_coordinates.svg new file mode 100644 index 0000000..970c9f4 --- /dev/null +++ b/docs/images/normalized_device_coordinates.svg @@ -0,0 +1,219 @@ + + + + + + + + + + image/svg+xml + + + + + + + + Framebuffer coordinates + (0, 0) + (1920, 0) + (0, 1080) + (1920, 1080) + + (960, 540) + + Normalized device coordinates + (-1, -1) + (1, -1) + (-1, 1) + (1, 1) + + (0, 0) + +