- fix: gl_PointSize is required in Vulkan when drawing points

- fix: add depthstencil attachment when stencil is active while depth is not
This commit is contained in:
Magnus Norddahl 2019-03-03 23:30:36 +01:00
parent 923fb5c127
commit 56afcd210b
2 changed files with 3 additions and 1 deletions

View File

@ -312,7 +312,7 @@ void VkRenderPassSetup::CreateFramebuffer(const VkRenderPassKey &key)
builder.setRenderPass(RenderPass.get());
builder.setSize(SCREENWIDTH, SCREENHEIGHT);
builder.addAttachment(fb->GetRenderPassManager()->SceneColorView.get());
if (key.DepthTest || key.DepthWrite)
if (key.DepthTest || key.DepthWrite || key.StencilTest)
builder.addAttachment(fb->GetRenderPassManager()->SceneDepthStencilView.get());
Framebuffer = builder.create(GetVulkanFrameBuffer()->device);
}

View File

@ -122,4 +122,6 @@ void main()
gl_ClipDistance[3] = 1;
gl_ClipDistance[4] = 1;
}
gl_PointSize = 1.0;
}