Data: update built-in graphics mods to use 2.0 features

This commit is contained in:
iwubcode 2024-04-09 00:11:56 -05:00
parent f3e6c1e74b
commit 4dfce19b7a
21 changed files with 626 additions and 317 deletions

View file

@ -1,15 +1,22 @@
{
"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."
},
"features":
[
{
"group": "Bloom",
"action": "skip"
}
]
}
"actions": [
{
"data": {},
"factory_name": "skip"
}
],
"assets": [
],
"meta": {
"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.",
"mod_version": "1.0.0",
"schema_version": 1,
"title": "Bloom Removal"
},
"tag_to_actions": {
"Bloom": [
0
]
}
}

View file

@ -1,15 +1,22 @@
{
"meta":
{
"title": "DOF Removal",
"author": "Dolphin Team",
"description": "Skips drawing DOF effects. May be preferable when using a DOF solution from Dolphin's post processing shaders or a third party tool."
},
"features":
[
{
"group": "DOF",
"action": "skip"
}
]
"actions": [
{
"data": {},
"factory_name": "skip"
}
],
"assets": [
],
"meta": {
"author": "Dolphin Team",
"description": "Skips drawing DOF effects. May be preferable when using a DOF solution from Dolphin's post processing shaders or a third party tool.",
"mod_version": "1.0.0",
"schema_version": 1,
"title": "DOF Removal"
},
"tag_to_actions": {
"Depth of Field": [
0
]
}
}

View file

@ -1,14 +1,22 @@
{
"meta":
{
"title": "Remove HUD",
"author": "Dolphin Team",
"description": "Skips drawing elements designated as the HUD. Can be used for taking screenshots or increasing immersion."
},
"features": [
{
"group": "HUD",
"action": "skip"
}
]
}
"actions": [
{
"data": {},
"factory_name": "skip"
}
],
"assets": [
],
"meta": {
"author": "Dolphin Team",
"description": "Skips drawing elements designated as the HUD. Can be used for taking screenshots or increasing immersion.",
"mod_version": "1.0.0",
"schema_version": 1,
"title": "Remove HUD"
},
"tag_to_actions": {
"User Interface": [
0
]
}
}

View file

@ -0,0 +1,66 @@
float4 SampleTexmap(uint texmap, float3 coords)
{
for (uint i = 0; i < 8; i++)
{
if (texmap == i)
{
return texture(samp[i], coords);
}
}
return float4(0, 0, 0, 1);
}
float2 GetTextureSize(uint texmap)
{
for (uint i = 0; i < 8; i++)
{
if (texmap == i)
{
return float2(textureSize(samp[i], 0));
}
}
return float2(0, 0);
}
vec4 custom_main( in CustomShaderData data )
{
if (data.texcoord_count == 0)
{
return data.final_color;
}
if (data.tev_stage_count == 0)
{
return data.final_color;
}
uint efb = data.tev_stages[0].texmap;
float3 coords = data.texcoord[0];
float4 out_color = SampleTexmap(efb, coords);
float2 size = GetTextureSize(efb);
// If options are added to the UI, include custom radius and intensity, radius should be around IR - 1.
// Small values decrease bloom area, but can lead to broken bloom if too small.
float intensity = 1.0;
float radius = 3;
float dx = 1.0/size.x;
float dy = 1.0/size.y;
float x;
float y;
float count = 1.0;
float4 color = float4(0.0, 0.0, 0.0, 0.0);
for (x = -radius; x <= radius; x++)
{
for (y = -radius; y <= radius; y++)
{
count += 1.0;
float3 off_coords = float3(coords.x + x*dx, coords.y + y*dy, coords.z);
color += SampleTexmap(efb, off_coords);
}
}
out_color = color / count * intensity;
return out_color;
}

View file

@ -0,0 +1,4 @@
{
"shader_asset": "bloom_shader",
"values": []
}

View file

@ -0,0 +1,3 @@
{
"properties": []
}

View file

@ -1,20 +1,42 @@
{
"meta":
{
"title": "Native Resolution Bloom",
"author": "Dolphin Team",
"description": "Scales bloom effects to draw at their native resolution, regardless of internal resolution. Results in bloom looking much more natural at higher resolutions but may cause shimmering."
},
"features":
[
{
"group": "Bloom",
"action": "scale",
"action_data": {
"X": 1.0,
"Y": 1.0,
"Z": 1.0
}
}
]
}
"actions": [
{
"data": {
"active": true,
"passes": [
{
"pixel_material_asset": "bloom_material"
}
]
},
"factory_name": "custom_pipeline"
}
],
"assets": [
{
"data": {
"metadata": "bloom.shader",
"shader": "bloom.glsl"
},
"id": "bloom_shader"
},
{
"data": {
"metadata": "bloom.material"
},
"id": "bloom_material"
}
],
"meta": {
"author": "Dolphin Team",
"description": "Scales bloom effects to draw at their native resolution, regardless of internal resolution. Results in bloom looking much more natural at higher resolutions.",
"mod_version": "1.0.0",
"schema_version": 1,
"title": "Native Resolution Bloom"
},
"tag_to_actions": {
"Bloom": [
0
]
}
}

View file

@ -0,0 +1,66 @@
float4 SampleTexmap(uint texmap, float3 coords)
{
for (uint i = 0; i < 8; i++)
{
if (texmap == i)
{
return texture(samp[i], coords);
}
}
return float4(0, 0, 0, 1);
}
float2 GetTextureSize(uint texmap)
{
for (uint i = 0; i < 8; i++)
{
if (texmap == i)
{
return float2(textureSize(samp[i], 0));
}
}
return float2(0, 0);
}
vec4 custom_main( in CustomShaderData data )
{
if (data.texcoord_count == 0)
{
return data.final_color;
}
if (data.tev_stage_count == 0)
{
return data.final_color;
}
uint efb = data.tev_stages[0].texmap;
float3 coords = data.texcoord[0];
float4 out_color = SampleTexmap(efb, coords);
float2 size = GetTextureSize(efb);
// If options are added to the UI, include custom radius and intensity, radius should be around IR - 1.
// Small values decrease bloom area, but can lead to broken bloom if too small.
float intensity = 1.0;
float radius = 3;
float dx = 1.0/size.x;
float dy = 1.0/size.y;
float x;
float y;
float count = 1.0;
float4 color = float4(0.0, 0.0, 0.0, 0.0);
for (x = -radius; x <= radius; x++)
{
for (y = -radius; y <= radius; y++)
{
count += 1.0;
float3 off_coords = float3(coords.x + x*dx, coords.y + y*dy, coords.z);
color += SampleTexmap(efb, off_coords);
}
}
out_color = color / count * intensity;
return out_color;
}

View file

@ -0,0 +1,4 @@
{
"shader_asset": "dof_shader",
"values": []
}

View file

@ -0,0 +1,3 @@
{
"properties": []
}

View file

@ -1,20 +1,42 @@
{
"meta":
{
"title": "Native Resolution DOF",
"author": "Dolphin Team",
"description": "Scales DOF effects to draw at their native resolution, regardless of internal resolution. Results in DOF looking much more natural at higher resolutions but may cause shimmering."
},
"features":
[
{
"group": "DOF",
"action": "scale",
"action_data": {
"X": 1.0,
"Y": 1.0,
"Z": 1.0
}
}
]
"actions": [
{
"data": {
"active": true,
"passes": [
{
"pixel_material_asset": "dof_material"
}
]
},
"factory_name": "custom_pipeline"
}
],
"assets": [
{
"data": {
"metadata": "dof.shader",
"shader": "dof.glsl"
},
"id": "dof_shader"
},
{
"data": {
"metadata": "dof.material"
},
"id": "dof_material"
}
],
"meta": {
"author": "Dolphin Team",
"description": "Scales depth of field (dof) effects to draw at their native resolution, regardless of internal resolution. Results for dof looking much more natural at higher resolutions.",
"mod_version": "1.0.0",
"schema_version": 1,
"title": "Native Resolution DOF"
},
"tag_to_actions": {
"Depth of Field": [
0
]
}
}

View file

@ -1,19 +1,29 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n33_160x112_6"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Arc Rise Fantasia Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {
"0": []
},
"targets": [
{
"id": "16030373046293997871",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,19 +1,27 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n2_320x224_4"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Donkey Kong Country Returns Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "3405476862620419263",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,27 +1,27 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n3_80x56_6"
},
{
"type": "efb",
"texture_filename": "efb1_n2_160x112_6"
},
{
"type": "efb",
"texture_filename": "efb1_n6_320x224_6"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Monster Hunter Tri Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "13233451943079225832",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,19 +1,27 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n000019_128x128_4"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Nights Journey of Dreams Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "13920250048690583912",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,19 +1,27 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n51_320x240_6"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Okami Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "6230608514450344714",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,36 +1,27 @@
{
"meta":
{
"title": "Bloom and DOF Texture Definitions",
"author": "linckandrea"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n09_20x15_1"
},
{
"type": "efb",
"texture_filename": "efb1_n21_20x15_1"
}
]
},
{
"name": "DOF",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n10_320x240_4"
},
{
"type": "efb",
"texture_filename": "efb1_n11_320x240_1"
}
]
}
]
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Pandoras Tower Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "10512703869395082884",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,31 +1,47 @@
{
"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"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "The Conduit Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {
"0": [],
"1": [],
"2": []
},
"targets": [
{
"id": "1759966615601106229",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "2423050791446092715",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "4157223477088026000",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,23 +1,27 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n55_80x57_6"
},
{
"type": "efb",
"texture_filename": "efb1_n54_160x114_6"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Twilight Princess Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "10063434684210657575",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,27 +1,43 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n9_80x58_6"
},
{
"type": "efb",
"texture_filename": "efb1_n21_80x57_6"
},
{
"type": "efb",
"texture_filename": "efb1_n2_320x228_6"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Wii Play Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "5238528733911143545",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "10820371786676733846",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "18418729168554791402",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

@ -1,31 +1,67 @@
{
"meta":
{
"title": "Bloom Texture Definitions",
"author": "iwubcode"
},
"groups":
[
{
"name": "Bloom",
"targets": [
{
"type": "efb",
"texture_filename": "efb1_n15_20x16_4"
},
{
"type": "efb",
"texture_filename": "efb1_n9_40x30_4"
},
{
"type": "efb",
"texture_filename": "efb1_n7_80x58_4"
},
{
"type": "efb",
"texture_filename": "efb1_n1_320x228_4"
}
]
}
]
}
"actions": [],
"assets": [],
"default_hash_policy": {
"attributes": ""
},
"meta": {
"author": "iwubcode",
"description": "",
"mod_version": "",
"schema_version": 1,
"title": "Xenoblade Definitions"
},
"tag_to_actions": {},
"tags": [],
"target_to_actions": {},
"targets": [
{
"id": "1873769556004204196",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "2784022002606692122",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "5940037079112913957",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "8606219869014623335",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "11236664535429889509",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "15824374617827814652",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}