DirectX保守深度

时间:2014-06-21 18:54:16

标签: c++ opengl directx hlsl

我想在流体渲染器中使用保守深度来使用硬件优化。 我想在像素着色器中更改深度值

这里是像素输出类型

struct PShaderOutput
{

   float4 targetRender1 : SV_Target0;
   float depth : SV_DepthLessEqual;

};

和我的像素着色器的结尾

PShaderOutput pixelOut;
pixelOut.depth      = depthval;
pixelOut.targetRender1  = float4(depthval,depthval,depthval,1.0f);
return pixelOut;

但它对提高性能没有任何影响。

0 个答案:

没有答案