From 741bb50fd770747c34b5d1c376004767cc5d4764 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Mon, 24 Apr 2017 20:22:19 +0200 Subject: [PATCH] Enabled culling --- pbrtexture/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pbrtexture/main.cpp b/pbrtexture/main.cpp index bad71109..0ba7ed63 100644 --- a/pbrtexture/main.cpp +++ b/pbrtexture/main.cpp @@ -274,7 +274,7 @@ public: vks::initializers::pipelineInputAssemblyStateCreateInfo(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, 0, VK_FALSE); VkPipelineRasterizationStateCreateInfo rasterizationState = - vks::initializers::pipelineRasterizationStateCreateInfo(VK_POLYGON_MODE_FILL, VK_CULL_MODE_NONE, VK_FRONT_FACE_COUNTER_CLOCKWISE); + vks::initializers::pipelineRasterizationStateCreateInfo(VK_POLYGON_MODE_FILL, VK_CULL_MODE_BACK_BIT, VK_FRONT_FACE_COUNTER_CLOCKWISE); VkPipelineColorBlendAttachmentState blendAttachmentState = vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE); @@ -344,6 +344,7 @@ public: VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipelines.skybox)); // PBR pipeline + rasterizationState.cullMode = VK_CULL_MODE_FRONT_BIT; shaderStages[0] = loadShader(ASSET_PATH "shaders/pbrtexture/pbrtexture.vert.spv", VK_SHADER_STAGE_VERTEX_BIT); shaderStages[1] = loadShader(ASSET_PATH "shaders/pbrtexture/pbrtexture.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT); // Enable depth test and write