diff --git a/src/renderer/BehPipelines.cpp b/src/renderer/BehPipelines.cpp index 5ce2d44..a4bc268 100644 --- a/src/renderer/BehPipelines.cpp +++ b/src/renderer/BehPipelines.cpp @@ -65,7 +65,7 @@ void BehPipeline::createGraphicsPipeline(PipelineConfigurationInfo &config, std: .depthClampEnable = VK_FALSE, .rasterizerDiscardEnable = VK_FALSE, .polygonMode = config.polygonMode, - .cullMode = vk::CullModeFlagBits::eBack, + .cullMode = config.cullMode, .frontFace = vk::FrontFace::eCounterClockwise, .depthBiasEnable = VK_FALSE, .depthBiasConstantFactor = 0.0f, diff --git a/src/renderer/BehPipelines.hpp b/src/renderer/BehPipelines.hpp index 1c0d4eb..47d3d7e 100644 --- a/src/renderer/BehPipelines.hpp +++ b/src/renderer/BehPipelines.hpp @@ -14,6 +14,7 @@ struct PipelineConfigurationInfo { vk::PipelineLayout pipelineLayout = nullptr; vk::RenderPass renderPass = nullptr; vk::PrimitiveTopology topology = vk::PrimitiveTopology::eTriangleList; + vk::CullModeFlags cullMode = vk::CullModeFlagBits::eBack; float lineWidth = 1.0f; vk::PipelineColorBlendAttachmentState colorBlendAttachment { diff --git a/src/renderer/Renderer.cpp b/src/renderer/Renderer.cpp index 3930c45..a1759a0 100644 --- a/src/renderer/Renderer.cpp +++ b/src/renderer/Renderer.cpp @@ -520,6 +520,7 @@ void Renderer::createSkyboxPipeline() { .inputRate = vk::VertexInputRate::eVertex } }; + pipelineConfig.cullMode = vk::CullModeFlagBits::eFront; // Done instead of swapping the cube inside out. pipelineConfig.addShader("shaders/skybox.vert.spv", vk::ShaderStageFlagBits::eVertex); pipelineConfig.addShader("shaders/skybox.frag.spv", vk::ShaderStageFlagBits::eFragment); pipelineConfig.pipelineLayout = skyboxPipelineLayout;