[graphics] improve blending when depth write is disabled (#1386)

This commit is contained in:
water111 2022-05-30 13:05:49 -04:00 committed by GitHub
parent dad84ec249
commit 7fc0a07c88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,9 +103,13 @@ DoubleDraw setup_opengl_from_draw_mode(DrawMode mode, u32 tex_unit, bool mipmap)
// ok, no need for double draw
break;
case GsTest::AlphaFail::FB_ONLY:
// darn, we need to draw twice
double_draw.kind = DoubleDrawKind::AFAIL_NO_DEPTH_WRITE;
double_draw.aref_second = alpha_min;
if (mode.get_depth_write_enable()) {
// darn, we need to draw twice
double_draw.kind = DoubleDrawKind::AFAIL_NO_DEPTH_WRITE;
double_draw.aref_second = alpha_min;
} else {
alpha_min = 0.f;
}
break;
default:
ASSERT(false);