mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(gx): handle alpha ref render state in d3d backend
This commit is contained in:
parent
648468531f
commit
d6cada50cd
1 changed files with 13 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue