Removed fragment shader from shadow map generation pipeline

This commit is contained in:
saschawillems 2018-09-16 21:39:31 +02:00
parent bf67bd6061
commit f1a7e66de1
3 changed files with 2 additions and 14 deletions

View file

@ -1,11 +0,0 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout(location = 0) out float fragmentdepth;
void main()
{
fragmentdepth = gl_FragCoord.z;
}

View file

@ -962,10 +962,9 @@ public:
// Shadow mapping pipeline
// The shadow mapping pipeline uses geometry shader instancing (invocations layout modifier) to output
// shadow maps for multiple lights sources into the different shadow map layers in one single render pass
std::array<VkPipelineShaderStageCreateInfo, 3> shadowStages;
std::array<VkPipelineShaderStageCreateInfo, 2> shadowStages;
shadowStages[0] = loadShader(getAssetPath() + "shaders/deferredshadows/shadow.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
shadowStages[1] = loadShader(getAssetPath() + "shaders/deferredshadows/shadow.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
shadowStages[2] = loadShader(getAssetPath() + "shaders/deferredshadows/shadow.geom.spv", VK_SHADER_STAGE_GEOMETRY_BIT);
shadowStages[1] = loadShader(getAssetPath() + "shaders/deferredshadows/shadow.geom.spv", VK_SHADER_STAGE_GEOMETRY_BIT);
pipelineCreateInfo.pStages = shadowStages.data();
pipelineCreateInfo.stageCount = static_cast<uint32_t>(shadowStages.size());