Merge pull request #489 from prideout/shadowfix

Disable fragment shader when generating shadow map.
This commit is contained in:
Sascha Willems 2018-06-30 17:02:12 +02:00 committed by GitHub
commit 7043c25ee5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -755,9 +755,9 @@ public:
enablePCF = 1; enablePCF = 1;
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipelines.sceneShadowPCF)); VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipelines.sceneShadowPCF));
// Offscreen pipeline // Offscreen pipeline (vertex shader only)
shaderStages[0] = loadShader(getAssetPath() + "shaders/shadowmapping/offscreen.vert.spv", VK_SHADER_STAGE_VERTEX_BIT); shaderStages[0] = loadShader(getAssetPath() + "shaders/shadowmapping/offscreen.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
shaderStages[1] = loadShader(getAssetPath() + "shaders/shadowmapping/offscreen.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT); pipelineCreateInfo.stageCount = 1;
// No blend attachment states (no color attachments used) // No blend attachment states (no color attachments used)
colorBlendState.attachmentCount = 0; colorBlendState.attachmentCount = 0;
// Cull front faces // Cull front faces