0
$\begingroup$

I'd like to store arbitrary float depth, so I have to disable both primitive clipping and depth clamping.

I can disable clipping by setting VkPipelineRasterizationStateCreateInfo::depthClampEnable to VK_TRUE, but then I'd have to increase my viewport bounds to the range I wish to store (which is 0..FLT_MAX) and during rasterization my depth value would be multiplied by viewport depth range and would blow up.

Fortunately, I can disable both clipping and clamping using the VK_EXT_depth_clip_enable, but turns out it was supported by the drivers quite recently.

Is there any way to disable both depth clamping and clipping on older drivers (i.e., without using VK_EXT_depth_clip_enable)?

$\endgroup$
  • $\begingroup$ "Is there any way to disable both depth clamping and clipping on older drivers" If there was a way, why would the extension need to exist? $\endgroup$ – Nicol Bolas Sep 6 at 16:11
  • $\begingroup$ @NicolBolas, yeah, I thought about it. Just wondered maybe there is a way to achieve this using some other transform in the pipeline or disable them both by enabling some other pipeline feature. But now as you commented with the same idea about rationale behind the extension, I see that chances are slim. $\endgroup$ – Vladimir Nazarenko Sep 9 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.