mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 01:55:21 +03:00
feat(gx): handle alpha ref render state in d3d backend
This commit is contained in:
parent
648468531f
commit
d6cada50cd
@ -771,6 +771,19 @@ void CGxDeviceD3d::IRsSendToHw(EGxRenderState which) {
|
||||
switch (which) {
|
||||
// TODO handle all render states
|
||||
|
||||
case GxRs_AlphaRef: {
|
||||
auto alphaRef = static_cast<int32_t>(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<uint32_t>((&this->m_appRenderStates[GxRs_DepthTest])->m_value);
|
||||
|
Loading…
Reference in New Issue
Block a user