Optimize RenderTargetWriteMask on depth pass for transparency and terrain materials
This commit is contained in:
@@ -185,6 +185,7 @@ bool ForwardMaterialShader::Load()
|
||||
psDesc.DepthWriteEnable = true;
|
||||
psDesc.DepthEnable = true;
|
||||
psDesc.DepthFunc = ComparisonFunc::Less;
|
||||
psDesc.BlendMode.RenderTargetWriteMask = BlendingMode::ColorWrite::None;
|
||||
psDesc.HS = nullptr;
|
||||
psDesc.DS = nullptr;
|
||||
psDesc.VS = _shader->GetVS("VS");
|
||||
|
||||
@@ -253,6 +253,7 @@ bool ParticleMaterialShader::Load()
|
||||
psDesc = GPUPipelineState::Description::Default;
|
||||
psDesc.CullMode = CullMode::TwoSided;
|
||||
psDesc.DepthClipEnable = false;
|
||||
psDesc.BlendMode.RenderTargetWriteMask = BlendingMode::ColorWrite::None;
|
||||
psDesc.PS = _shader->GetPS("PS_Depth");
|
||||
psDesc.VS = vsSprite;
|
||||
_cacheSprite.Depth.Init(psDesc);
|
||||
|
||||
@@ -191,6 +191,7 @@ bool TerrainMaterialShader::Load()
|
||||
psDesc.DepthWriteEnable = true;
|
||||
psDesc.DepthEnable = true;
|
||||
psDesc.DepthFunc = ComparisonFunc::Less;
|
||||
psDesc.BlendMode.RenderTargetWriteMask = BlendingMode::ColorWrite::None;
|
||||
psDesc.HS = nullptr;
|
||||
psDesc.DS = nullptr;
|
||||
psDesc.PS = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user