[Vulkan] Implement alpha to coverage (FBO)

Fixes the foliage rendering in places like Red Dead Redemption menu
This commit is contained in:
Herman S.
2025-11-19 10:55:06 +09:00
parent 75589de0a4
commit cba315cf38
4 changed files with 366 additions and 3 deletions

View File

@@ -4198,6 +4198,13 @@ void VulkanCommandProcessor::UpdateSystemConstantValues(
dirty |= system_constants_.alpha_test_reference != rb_alpha_ref;
system_constants_.alpha_test_reference = rb_alpha_ref;
// Alpha to coverage.
uint32_t alpha_to_mask = rb_colorcontrol.alpha_to_mask_enable
? (rb_colorcontrol.value >> 24) | (1 << 8)
: 0;
dirty |= system_constants_.alpha_to_mask != alpha_to_mask;
system_constants_.alpha_to_mask = alpha_to_mask;
uint32_t edram_tile_dwords_scaled =
xenos::kEdramTileWidthSamples * xenos::kEdramTileHeightSamples *
(draw_resolution_scale_x * draw_resolution_scale_y);