diff --git a/src/gx/d3d/CGxDeviceD3d.cpp b/src/gx/d3d/CGxDeviceD3d.cpp index e1d5e03..8687c23 100644 --- a/src/gx/d3d/CGxDeviceD3d.cpp +++ b/src/gx/d3d/CGxDeviceD3d.cpp @@ -771,6 +771,19 @@ void CGxDeviceD3d::IRsSendToHw(EGxRenderState which) { switch (which) { // TODO handle all render states + case GxRs_AlphaRef: { + auto alphaRef = static_cast(state->m_value); + + if (alphaRef <= 0) { + this->DsSet(Ds_AlphaTestEnable, 0); + } else { + this->DsSet(Ds_AlphaRef, alphaRef); + this->DsSet(Ds_AlphaTestEnable, 1); + } + + break; + } + case GxRs_DepthTest: case GxRs_DepthFunc: { auto depthTest = static_cast((&this->m_appRenderStates[GxRs_DepthTest])->m_value);