Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.12k stars 513 forks source link

Mention vertex order corresponds to the primitive's winding order used for front face culling. #167

Open JesseRMeyer opened 4 years ago

JesseRMeyer commented 4 years ago

https://github.com/Overv/VulkanTutorial/blob/56389adfef6d51493df7a50475fcf01c36f75c4d/code/09_shader_base.vert#L6

Excellent tutorial. It would be instructive to highlight the importance of the order the vertices are declared in, and that they correspond to the winding order used for front-faced culling. I had unknowingly swapped the last two vertices as I typed them in, which caused the triangle to 'flip', be culled as part of the clockwise front face setting, and ultimately result in a blank screen upon finishing the presentation section.