diff semiconginev2/rendering/shaders.nim @ 1257:e9b8d87b9883

fix: super stupid bug in perspective matrix X(
author sam <sam@basx.dev>
date Sun, 28 Jul 2024 18:55:46 +0700
parents c4f98eb4bb05
children
line wrap: on
line diff
--- a/semiconginev2/rendering/shaders.nim	Sun Jul 28 17:33:41 2024 +0700
+++ b/semiconginev2/rendering/shaders.nim	Sun Jul 28 18:55:46 2024 +0700
@@ -364,6 +364,7 @@
   cullMode: openArray[VkCullModeFlagBits] = [VK_CULL_MODE_BACK_BIT],
   frontFace: VkFrontFace = VK_FRONT_FACE_CLOCKWISE,
   lineWidth = 1'f32,
+  depthClampEnable = false,
 ): Pipeline[TShader] =
   # create pipeline
 
@@ -445,7 +446,7 @@
     )
     rasterizer = VkPipelineRasterizationStateCreateInfo(
       sType: VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
-      depthClampEnable: VK_FALSE,
+      depthClampEnable: depthClampEnable,
       rasterizerDiscardEnable: VK_FALSE,
       polygonMode: polygonMode,
       lineWidth: lineWidth,