- add depth bias
This commit is contained in:
parent
cf49e1ec21
commit
eaf367e876
5 changed files with 25 additions and 1 deletions
|
|
@ -189,6 +189,7 @@ public:
|
|||
void setDepthStencilEnable(bool test, bool write, bool stencil);
|
||||
void setDepthFunc(VkCompareOp func);
|
||||
void setDepthClampEnable(bool value);
|
||||
void setDepthBias(bool enable, float biasConstantFactor, float biasClamp, float biasSlopeFactor);
|
||||
void setColorWriteMask(VkColorComponentFlags mask);
|
||||
void setStencil(VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, uint32_t compareMask, uint32_t writeMask, uint32_t reference);
|
||||
|
||||
|
|
@ -806,6 +807,14 @@ inline void GraphicsPipelineBuilder::setDepthClampEnable(bool value)
|
|||
rasterizer.depthClampEnable = value ? VK_TRUE : VK_FALSE;
|
||||
}
|
||||
|
||||
inline void GraphicsPipelineBuilder::setDepthBias(bool enable, float biasConstantFactor, float biasClamp, float biasSlopeFactor)
|
||||
{
|
||||
rasterizer.depthBiasEnable = enable ? VK_TRUE : VK_FALSE;
|
||||
rasterizer.depthBiasConstantFactor = biasConstantFactor;
|
||||
rasterizer.depthBiasClamp = biasClamp;
|
||||
rasterizer.depthBiasSlopeFactor = biasSlopeFactor;
|
||||
}
|
||||
|
||||
inline void GraphicsPipelineBuilder::setColorWriteMask(VkColorComponentFlags mask)
|
||||
{
|
||||
colorBlendAttachment.colorWriteMask = mask;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue