mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-28 09:23:34 +00:00
DX12 : add remaining constant color/alpha blending (#1834)
This commit is contained in:
parent
028277bd2d
commit
2c10348408
@ -38,10 +38,13 @@ D3D12_BLEND get_blend_factor(u16 factor)
|
||||
case CELL_GCM_DST_COLOR: return D3D12_BLEND_DEST_COLOR;
|
||||
case CELL_GCM_ONE_MINUS_DST_COLOR: return D3D12_BLEND_INV_DEST_COLOR;
|
||||
case CELL_GCM_SRC_ALPHA_SATURATE: return D3D12_BLEND_SRC_ALPHA_SAT;
|
||||
|
||||
// The following constant color/alpha blending are hack/wrong since it is no matching one in D3D12
|
||||
// therefore we workaround using approx one until we find better solution .
|
||||
case CELL_GCM_CONSTANT_COLOR: return D3D12_BLEND_DEST_COLOR;
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_COLOR: return D3D12_BLEND_INV_DEST_COLOR;
|
||||
case CELL_GCM_CONSTANT_ALPHA:
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA:
|
||||
case CELL_GCM_CONSTANT_ALPHA: return D3D12_BLEND_DEST_ALPHA;
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: return D3D12_BLEND_INV_DEST_ALPHA;
|
||||
break;
|
||||
}
|
||||
throw EXCEPTION("Invalid or unsupported blend factor (0x%x)", factor);
|
||||
@ -62,10 +65,13 @@ D3D12_BLEND get_blend_factor_alpha(u16 factor)
|
||||
case CELL_GCM_DST_COLOR: return D3D12_BLEND_DEST_ALPHA;
|
||||
case CELL_GCM_ONE_MINUS_DST_COLOR: return D3D12_BLEND_INV_DEST_ALPHA;
|
||||
case CELL_GCM_SRC_ALPHA_SATURATE: return D3D12_BLEND_SRC_ALPHA_SAT;
|
||||
case CELL_GCM_CONSTANT_COLOR:
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_COLOR:
|
||||
case CELL_GCM_CONSTANT_ALPHA:
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA:
|
||||
|
||||
// The following constant color/alpha blending are hack/wrong since it is no matching one in D3D12
|
||||
// therefore we workaround using approx one until we find better solution .
|
||||
case CELL_GCM_CONSTANT_COLOR: return D3D12_BLEND_DEST_ALPHA;
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_COLOR: return D3D12_BLEND_INV_DEST_ALPHA;
|
||||
case CELL_GCM_CONSTANT_ALPHA: return D3D12_BLEND_DEST_ALPHA;
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: return D3D12_BLEND_INV_DEST_ALPHA;
|
||||
break;
|
||||
}
|
||||
throw EXCEPTION("Invalid or unsupported blend alpha factor (0x%x)", factor);
|
||||
|
Loading…
Reference in New Issue
Block a user