Skip to content

Commit

Permalink
fix graphics ext depth bias not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Dec 6, 2024
1 parent 28c5875 commit c88a986
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/pl_graphics_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Index of this file:
// [SECTION] apis
//-----------------------------------------------------------------------------

#define plGraphicsI_version (plVersion){1, 0, 1}
#define plGraphicsI_version (plVersion){1, 0, 2}

//-----------------------------------------------------------------------------
// [SECTION] includes
Expand Down
3 changes: 2 additions & 1 deletion extensions/pl_graphics_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ pl_create_shader(plDevice* ptDevice, const plShaderDesc* ptDescription)
.lineWidth = 1.0f,
.cullMode = pl__vulkan_cull((plCullMode)ptDescription->tGraphicsState.ulCullMode),
.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE,
.depthBiasEnable = VK_FALSE
.depthBiasEnable = VK_TRUE
};

VkPipelineShaderStageCreateInfo tFragShaderStageInfo = {
Expand Down Expand Up @@ -1845,6 +1845,7 @@ pl_begin_render_pass(plCommandBuffer* ptCmdBuffer, plRenderPassHandle tPass)

vkCmdSetViewport(ptCmdBuffer->tCmdBuffer, 0, 1, &tViewport);
vkCmdSetScissor(ptCmdBuffer->tCmdBuffer, 0, 1, &tScissor);
vkCmdSetDepthBias(ptCmdBuffer->tCmdBuffer, 0.0f, 0.0f, 1.0f);

plRenderEncoder* ptEncoder = pl__get_new_render_encoder();
ptEncoder->ptCommandBuffer = ptCmdBuffer;
Expand Down

0 comments on commit c88a986

Please sign in to comment.