fix depth function
This commit is contained in:
@@ -196,7 +196,7 @@ bool DeferredMaterialShader::Load()
|
||||
// Motion Vectors pass
|
||||
psDesc.DepthWriteEnable = false;
|
||||
psDesc.DepthEnable = true;
|
||||
psDesc.DepthFunc = ComparisonFunc::LessEqual;
|
||||
psDesc.DepthFunc = ComparisonFunc::GreaterEqual;
|
||||
psDesc.VS = _shader->GetVS("VS");
|
||||
psDesc.PS = _shader->GetPS("PS_MotionVectors");
|
||||
_cache.MotionVectors.Init(psDesc);
|
||||
@@ -214,7 +214,7 @@ bool DeferredMaterialShader::Load()
|
||||
psDesc.DepthClipEnable = false;
|
||||
psDesc.DepthWriteEnable = true;
|
||||
psDesc.DepthEnable = true;
|
||||
psDesc.DepthFunc = ComparisonFunc::Less;
|
||||
psDesc.DepthFunc = ComparisonFunc::Greater;
|
||||
psDesc.HS = nullptr;
|
||||
psDesc.DS = nullptr;
|
||||
GPUShaderProgramVS* instancedDepthPassVS;
|
||||
|
||||
@@ -173,7 +173,7 @@ bool DeformableMaterialShader::Load()
|
||||
psDesc.DepthClipEnable = false;
|
||||
psDesc.DepthWriteEnable = true;
|
||||
psDesc.DepthEnable = true;
|
||||
psDesc.DepthFunc = ComparisonFunc::Less;
|
||||
psDesc.DepthFunc = ComparisonFunc::Greater;
|
||||
psDesc.HS = nullptr;
|
||||
psDesc.DS = nullptr;
|
||||
_cache.Depth.Init(psDesc);
|
||||
|
||||
@@ -205,7 +205,7 @@ bool ForwardMaterialShader::Load()
|
||||
psDesc.DepthClipEnable = false;
|
||||
psDesc.DepthWriteEnable = true;
|
||||
psDesc.DepthEnable = true;
|
||||
psDesc.DepthFunc = ComparisonFunc::Less;
|
||||
psDesc.DepthFunc = ComparisonFunc::Greater;
|
||||
psDesc.HS = nullptr;
|
||||
psDesc.DS = nullptr;
|
||||
psDesc.VS = _shader->GetVS("VS");
|
||||
|
||||
@@ -185,7 +185,7 @@ bool TerrainMaterialShader::Load()
|
||||
psDesc.DepthClipEnable = false;
|
||||
psDesc.DepthWriteEnable = true;
|
||||
psDesc.DepthEnable = true;
|
||||
psDesc.DepthFunc = ComparisonFunc::Less;
|
||||
psDesc.DepthFunc = ComparisonFunc::Greater;
|
||||
psDesc.HS = nullptr;
|
||||
psDesc.DS = nullptr;
|
||||
// TODO: masked terrain materials (depth pass should clip holes)
|
||||
|
||||
Reference in New Issue
Block a user