Skybox cubemap rendering outdise the cube object

I followed the SaschaWillems texturecubemap example and I managed to load and create the cubemap image, image layout, image sampler and the image view. But when I finally render it with the skybox.vert and skybox.frag (after compiling them to SPIR-V) the cubemap renders outside the cube object (just like another object). I also used the Cube.obj file included in the repository.

What might be the reason for this error?
Thank You!

I found the solution myself so ill just state it here incase anyone else came across the same issue.

The issue was that in my pipeline creation, I stated “VK_FRONT_FACE_COUNTER_CLOCKWISE” in the “VkPipelineRasterizationStateCreateInfo::frontFace”. This must be set to “VK_FRONT_FACE_CLOCKWISE” as it considers any triangle with a negative area the front-facing. This is stated in the Vulkan specs.
Vulkan Specs

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.