Optimize RenderTargetWriteMask on depth pass for transparency and terrain materials

This commit is contained in:
Wojtek Figat
2026-01-19 17:45:18 +01:00
parent d049a16882
commit ec4f8ce239
3 changed files with 3 additions and 0 deletions

View File

@@ -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");

View File

@@ -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);

View File

@@ -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;