Pipeline创建增加对多ColorAttachment支持

This commit is contained in:
hyzboy 2019-07-10 14:55:34 +08:00
parent e8877ad3d6
commit 7f3a193676
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ public:
operator VkRenderPass(){return render_pass;}
const uint GetColorCount()const{return color_formats.GetCount();}
const List<VkFormat> & GetColorFormat()const{return color_formats;}
const VkFormat GetDepthFormat()const{return depth_format;}
};//class RenderPass

View File

@ -145,7 +145,7 @@ PipelineCreater::PipelineCreater(Device *dev,const Material *material,RenderPass
cba.srcAlphaBlendFactor = VK_BLEND_FACTOR_ZERO;
cba.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO;
colorBlendAttachments.Add(cba);
colorBlendAttachments.Add(cba,rp->GetColorCount()); //这个需要和subpass中的color attachment数量相等所以添加多份
alpha_blend=false;