Merge pull request #14140 from iwubcode/blurry_bloom

VideoCommon: add a graphics mod feature to modify EFBs with a custom material, enhance bloom
This commit is contained in:
JMC47
2026-04-03 13:38:04 -04:00
committed by GitHub
80 changed files with 1551 additions and 193 deletions

View File

@@ -0,0 +1,45 @@
void process_fragment(in DolphinFragmentInput frag_input, out DolphinFragmentOutput frag_output)
{
int layer = int(frag_input.tex0.z);
int r = int(efb_scale) * int(SPREAD_MULTIPLIER);
int coord;
int length;
int2 initial_coords = int2(frag_input.tex0.xy * source_resolution.xy);
vec4 brightness = float4(1.0, 1.0, 1.0, 1.0);
if (HORIZONTAL)
{
length = int(source_resolution.x);
coord = initial_coords.x;
brightness = BRIGHTNESS_MULTIPLIER * brightness;
}
else
{
length = int(source_resolution.y);
coord = initial_coords.y;
}
int offset;
vec4 count = vec4(0.0,0.0,0.0,0.0);
vec4 col = vec4(0.0,0.0,0.0,0.0);
for (offset = -r; offset <= r; offset++)
{
int pos = coord + offset;
if (pos <= length && pos >= 0)
{
int3 sample_coords;
if (HORIZONTAL)
{
sample_coords = int3(int2(pos, initial_coords.y), layer);
}
else
{
sample_coords = int3(int2(initial_coords.x, pos), layer);
}
col += texelFetch(samp0, sample_coords, 0);
count += vec4(1.0,1.0,1.0,1.0);
}
}
frag_output.main = col / count * brightness;
}

View File

@@ -0,0 +1,23 @@
{
"properties":[
{
"code_name": "HORIZONTAL",
"default": true,
"description": "Whether to apply the blur horizontally or vertically",
"type": "bool"
},
{
"code_name": "SPREAD_MULTIPLIER",
"default": 1.0,
"description": "How much to spread the blur",
"type": "float"
},
{
"code_name": "BRIGHTNESS_MULTIPLIER",
"default": 1.0,
"description": "How bright the blur is",
"type": "float"
}
],
"samplers":[]
}

View File

@@ -0,0 +1,4 @@
void process_vertex(in DolphinVertexInput vertex_input, out DolphinVertexOutput vertex_output)
{
dolphin_process_emulated_vertex(vertex_input, vertex_output);
}

View File

@@ -0,0 +1,19 @@
{
"next_material_asset":"dolphin_bloom_blur_vertical",
"properties":[
{
"type": "bool",
"value": true
},
{
"type": "float",
"value": 1.0
},
{
"type": "float",
"value": 1.0
}
],
"textures":[],
"shader_asset": "dolphin_bloom_blur"
}

View File

@@ -0,0 +1,19 @@
{
"next_material_asset":"",
"properties":[
{
"type": "bool",
"value": false
},
{
"type": "float",
"value": 1.0
},
{
"type": "float",
"value": 1.0
}
],
"textures":[],
"shader_asset": "dolphin_bloom_blur"
}

View File

@@ -0,0 +1,41 @@
{
"meta":
{
"title": "Bloom Blurred",
"author": "Dolphin Team",
"description": "Modifies bloom effects to blur them to their native resolution. Results in bloom looking much more natural at higher resolutions but the blur may be too intense in some games."
},
"features":
[
{
"group": "Bloom",
"action": "custom_pipeline",
"action_data":
{
"material_asset": "dolphin_bloom_blur_horizontal"
}
}
],
"assets": [
{
"data": {
"metadata": "blur.rastershader",
"pixel_shader": "blur.ps.glsl",
"vertex_shader": "blur.vs.glsl"
},
"name": "dolphin_bloom_blur"
},
{
"data": {
"metadata": "blur_horizontal.rastermaterial"
},
"name": "dolphin_bloom_blur_horizontal"
},
{
"data": {
"metadata": "blur_vertical.rastermaterial"
},
"name": "dolphin_bloom_blur_vertical"
}
]
}

View File

@@ -0,0 +1,45 @@
void process_fragment(in DolphinFragmentInput frag_input, out DolphinFragmentOutput frag_output)
{
int layer = int(frag_input.tex0.z);
int r = int(efb_scale) * int(SPREAD_MULTIPLIER);
int coord;
int length;
int2 initial_coords = int2(frag_input.tex0.xy * source_resolution.xy);
vec4 brightness = float4(1.0, 1.0, 1.0, 1.0);
if (HORIZONTAL)
{
length = int(source_resolution.x);
coord = initial_coords.x;
brightness = BRIGHTNESS_MULTIPLIER * brightness;
}
else
{
length = int(source_resolution.y);
coord = initial_coords.y;
}
int offset;
vec4 count = vec4(0.0,0.0,0.0,0.0);
vec4 col = vec4(0.0,0.0,0.0,0.0);
for (offset = -r; offset <= r; offset++)
{
int pos = coord + offset;
if (pos <= length && pos >= 0)
{
int3 sample_coords;
if (HORIZONTAL)
{
sample_coords = int3(int2(pos, initial_coords.y), layer);
}
else
{
sample_coords = int3(int2(initial_coords.x, pos), layer);
}
col += texelFetch(samp0, sample_coords, 0);
count += vec4(1.0,1.0,1.0,1.0);
}
}
frag_output.main = col / count * brightness;
}

View File

@@ -0,0 +1,23 @@
{
"properties":[
{
"code_name": "HORIZONTAL",
"default": true,
"description": "Whether to apply the blur horizontally or vertically",
"type": "bool"
},
{
"code_name": "SPREAD_MULTIPLIER",
"default": 1.0,
"description": "How much to spread the blur",
"type": "float"
},
{
"code_name": "BRIGHTNESS_MULTIPLIER",
"default": 1.0,
"description": "How bright the blur is",
"type": "float"
}
],
"samplers":[]
}

View File

@@ -0,0 +1,4 @@
void process_vertex(in DolphinVertexInput vertex_input, out DolphinVertexOutput vertex_output)
{
dolphin_process_emulated_vertex(vertex_input, vertex_output);
}

View File

@@ -0,0 +1,19 @@
{
"next_material_asset":"dolphin_dof_blur_vertical",
"properties":[
{
"type": "bool",
"value": true
},
{
"type": "float",
"value": 1.0
},
{
"type": "float",
"value": 1.0
}
],
"textures":[],
"shader_asset": "dolphin_dof_blur"
}

View File

@@ -0,0 +1,19 @@
{
"next_material_asset":"",
"properties":[
{
"type": "bool",
"value": false
},
{
"type": "float",
"value": 1.0
},
{
"type": "float",
"value": 1.0
}
],
"textures":[],
"shader_asset": "dolphin_dof_blur"
}

View File

@@ -0,0 +1,41 @@
{
"meta":
{
"title": "DOF Blurred",
"author": "Dolphin Team",
"description": "Modifies depth of field effects to blur them to their native resolution. Results in depth of field looking much more natural at higher resolutions but the blur may be too intense in some games."
},
"features":
[
{
"group": "DOF",
"action": "custom_pipeline",
"action_data":
{
"material_asset": "dolphin_dof_blur_horizontal"
}
}
],
"assets": [
{
"data": {
"metadata": "blur.rastershader",
"pixel_shader": "blur.ps.glsl",
"vertex_shader": "blur.vs.glsl"
},
"name": "dolphin_dof_blur"
},
{
"data": {
"metadata": "blur_horizontal.rastermaterial"
},
"name": "dolphin_dof_blur_horizontal"
},
{
"data": {
"metadata": "blur_vertical.rastermaterial"
},
"name": "dolphin_dof_blur_vertical"
}
]
}

View File

@@ -0,0 +1,31 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000022_40x28_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000021_80x56_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000020_160x112_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000025_320x224_6"
}
]
}
]
}

View File

@@ -0,0 +1,65 @@
{
"meta":
{
"title": "Bloom Blurred",
"author": "Dolphin Team",
"description": "Modifies bloom effects to blur them to their native resolution. Results in bloom looking much more natural at higher resolutions but the blur may be too intense in some games."
},
"groups":
[
{
"name": "CustomBloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000134_20x14_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000022_40x28_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000131_80x56_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000130_160x112_6"
}
]
}
],
"features":
[
{
"group": "CustomBloom",
"action": "custom_pipeline",
"action_data":
{
"material_asset": "dolphin_bloom_blur_horizontal"
}
}
],
"assets": [
{
"data": {
"metadata": "../../All Games Blurred Bloom/blur.rastershader",
"pixel_shader": "../../All Games Blurred Bloom/blur.ps.glsl",
"vertex_shader": "../../All Games Blurred Bloom/blur.vs.glsl"
},
"name": "dolphin_bloom_blur"
},
{
"data": {
"metadata": "../../All Games Blurred Bloom/blur_horizontal.rastermaterial"
},
"name": "dolphin_bloom_blur_horizontal"
},
{
"data": {
"metadata": "../../All Games Blurred Bloom/blur_vertical.rastermaterial"
},
"name": "dolphin_bloom_blur_vertical"
}
]
}

View File

@@ -0,0 +1,64 @@
{
"meta":
{
"title": "Bloom Removal",
"author": "Dolphin Team",
"description": "Skips drawing bloom effects. May be preferable when using a bloom solution from Dolphin's post processing shaders or a third party tool. Requires enabling 'EFB Copy To Texture Only'"
},
"groups":
[
{
"name": "CustomBloom",
"targets": [
{
"type": "draw_started",
"texture_filename": "efb1_n000134_20x14_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000022_40x28_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000131_80x56_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000130_160x112_6"
}
]
},
{
"name": "Fixup",
"targets": [
{
"type": "draw_started",
"texture_filename": "tex1_256x179_802b7563f35b613a_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000182_640x448_5"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000380_320x224_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000380_240x224_6"
}
]
}
],
"features":
[
{
"group": "CustomBloom",
"action": "skip"
},
{
"group": "Fixup",
"action": "skip"
}
]
}

View File

@@ -0,0 +1,65 @@
{
"meta":
{
"title": "Bloom Blurred",
"author": "Dolphin Team",
"description": "Modifies bloom effects to blur them to their native resolution. Results in bloom looking much more natural at higher resolutions but the blur may be too intense in some games."
},
"groups":
[
{
"name": "CustomBloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000134_20x14_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000022_40x28_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000131_80x56_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000130_160x112_6"
}
]
}
],
"features":
[
{
"group": "CustomBloom",
"action": "custom_pipeline",
"action_data":
{
"material_asset": "dolphin_bloom_blur_horizontal"
}
}
],
"assets": [
{
"data": {
"metadata": "../../All Games Blurred Bloom/blur.rastershader",
"pixel_shader": "../../All Games Blurred Bloom/blur.ps.glsl",
"vertex_shader": "../../All Games Blurred Bloom/blur.vs.glsl"
},
"name": "dolphin_bloom_blur"
},
{
"data": {
"metadata": "../../All Games Blurred Bloom/blur_horizontal.rastermaterial"
},
"name": "dolphin_bloom_blur_horizontal"
},
{
"data": {
"metadata": "../../All Games Blurred Bloom/blur_vertical.rastermaterial"
},
"name": "dolphin_bloom_blur_vertical"
}
]
}

View File

@@ -0,0 +1,64 @@
{
"meta":
{
"title": "Bloom Removal",
"author": "Dolphin Team",
"description": "Skips drawing bloom effects. May be preferable when using a bloom solution from Dolphin's post processing shaders or a third party tool."
},
"groups":
[
{
"name": "CustomBloom",
"targets": [
{
"type": "draw_started",
"texture_filename": "efb1_n000134_20x14_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000022_40x28_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000131_80x56_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000130_160x112_6"
}
]
},
{
"name": "Fixup",
"targets": [
{
"type": "draw_started",
"texture_filename": "tex1_240x224_05a5e9c230d056cc_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000182_640x448_5"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000380_320x224_6"
},
{
"type": "draw_started",
"texture_filename": "efb1_n000380_240x224_6"
}
]
}
],
"features":
[
{
"group": "CustomBloom",
"action": "skip"
},
{
"group": "Fixup",
"action": "skip"
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000038_160x120_6"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000038_160x120_6"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000167_80x58_6"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000043_80x56_6"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000013_80x60_6"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000015_320x224_6"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000015_320x224_6"
}
]
}
]
}

View File

@@ -0,0 +1,23 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000069_80x60_4"
},
{
"type": "efb",
"texture_filename": "efb1_n000068_160x120_4"
}
]
}
]
}

View File

@@ -0,0 +1,23 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "autofire372"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000023_320x224_4"
},
{
"type": "efb",
"texture_filename": "efb1_n000024_320x224_4"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "Stalin15"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000010_80x60_6"
}
]
}
]
}

View File

@@ -2,7 +2,7 @@
"meta":
{
"title": "Bloom and DOF Texture Definitions",
"author": "linckandrea"
"author": "linckandrea, iwubcode"
},
"groups":
[
@@ -15,7 +15,7 @@
},
{
"type": "efb",
"texture_filename": "efb1_n21_20x15_1"
"texture_filename": "efb1_n21_40x30_1"
}
]
},
@@ -25,10 +25,6 @@
{
"type": "efb",
"texture_filename": "efb1_n10_320x240_4"
},
{
"type": "efb",
"texture_filename": "efb1_n11_320x240_1"
}
]
}

View File

@@ -0,0 +1,23 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000010_82x58_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000011_42x30_6"
}
]
}
]
}

View File

@@ -0,0 +1,23 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000010_82x58_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000011_42x30_6"
}
]
}
]
}

View File

@@ -2,7 +2,7 @@
"meta":
{
"title": "Bloom Texture Definitions",
"author": "Silent Hell"
"author": "Silent Hell, FrankyBuster"
},
"groups":
[
@@ -13,37 +13,17 @@
"type": "efb",
"texture_filename": "efb1_n000007_160x120_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000008_160x120_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000009_80x60_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000010_80x60_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000011_40x30_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000012_40x30_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000013_20x15_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000014_20x15_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000015_160x120_6"
}
]
}

View File

@@ -0,0 +1,23 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "Dr. Azathoth"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_320x240_6"
},
{
"type": "efb",
"texture_filename": "efb1_640x480_1"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000690_80x56_6"
}
]
}
]
}

View File

@@ -0,0 +1,23 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000102_80x66_6"
},
{
"type": "efb",
"texture_filename": "efb1_n000025_320x232_6"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000038_80x60_4"
}
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000102_80x66_6"
}
]
}
]
}