port: better menu blur

TODO: make it render the blurred texture to the fb once instead of rendering it blurred every frame
This commit is contained in:
fgsfds committed 2023-12-02 19:18:47 +01:00
1 parent aef2463361
commit 2c20a0487e
7 files changed
+50 -17

No files matched your search

+4
View File
@@ -1288,6 +1288,7 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo
(rdp.other_mode_l & (3 << 24)) == (G_BL_0 << 24) && (rdp.other_mode_l & (3 << 20)) == (G_BL_CLR_MEM << 20);
bool use_grayscale = rdp.grayscale;
bool use_modulate = use_alpha && (rsp.extra_geometry_mode & G_MODULATE_EXT) != 0;
bool use_blur = (rdp.other_mode_h & (3U << G_MDSFT_TEXTFILT)) == G_TF_BLUR_EXT;
if (texture_edge) {
use_alpha = true;
@@ -1317,6 +1318,9 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo
if (use_grayscale) {
cc_options |= (uint64_t)SHADER_OPT_GRAYSCALE;
}
if (use_blur) {
cc_options |= (uint64_t)SHADER_OPT_BLUR;
}
// If we are not using alpha, clear the alpha components of the combiner as they have no effect
if (!use_alpha) {