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
commit 4dfce19b7a
21 changed files with 626 additions and 317 deletions

View file

@ -1,15 +1,22 @@
{ {
"meta": "actions": [
{ {
"title": "Bloom Removal", "data": {},
"author": "Dolphin Team", "factory_name": "skip"
"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": "assets": [
[ ],
{ "meta": {
"group": "Bloom", "author": "Dolphin Team",
"action": "skip" "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": "actions": [
{ {
"title": "DOF Removal", "data": {},
"author": "Dolphin Team", "factory_name": "skip"
"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": "assets": [
[ ],
{ "meta": {
"group": "DOF", "author": "Dolphin Team",
"action": "skip" "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": "actions": [
{ {
"title": "Remove HUD", "data": {},
"author": "Dolphin Team", "factory_name": "skip"
"description": "Skips drawing elements designated as the HUD. Can be used for taking screenshots or increasing immersion." }
}, ],
"features": [ "assets": [
{ ],
"group": "HUD", "meta": {
"action": "skip" "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": "actions": [
{ {
"title": "Native Resolution Bloom", "data": {
"author": "Dolphin Team", "active": true,
"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." "passes": [
}, {
"features": "pixel_material_asset": "bloom_material"
[ }
{ ]
"group": "Bloom", },
"action": "scale", "factory_name": "custom_pipeline"
"action_data": { }
"X": 1.0, ],
"Y": 1.0, "assets": [
"Z": 1.0 {
} "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": "actions": [
{ {
"title": "Native Resolution DOF", "data": {
"author": "Dolphin Team", "active": true,
"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." "passes": [
}, {
"features": "pixel_material_asset": "dof_material"
[ }
{ ]
"group": "DOF", },
"action": "scale", "factory_name": "custom_pipeline"
"action_data": { }
"X": 1.0, ],
"Y": 1.0, "assets": [
"Z": 1.0 {
} "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": "actions": [],
{ "assets": [],
"title": "Bloom Texture Definitions", "default_hash_policy": {
"author": "iwubcode" "attributes": ""
}, },
"groups": "meta": {
[ "author": "iwubcode",
{ "description": "",
"name": "Bloom", "mod_version": "",
"targets": [ "schema_version": 1,
{ "title": "Arc Rise Fantasia Definitions"
"type": "efb", },
"texture_filename": "efb1_n33_160x112_6" "tag_to_actions": {},
} "tags": [],
] "target_to_actions": {
} "0": []
] },
} "targets": [
{
"id": "16030373046293997871",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,31 +1,47 @@
{ {
"meta": "actions": [],
{ "assets": [],
"title": "Bloom Texture Definitions", "default_hash_policy": {
"author": "iwubcode" "attributes": ""
}, },
"groups": "meta": {
[ "author": "iwubcode",
{ "description": "",
"name": "Bloom", "mod_version": "",
"targets": [ "schema_version": 1,
{ "title": "The Conduit Definitions"
"type": "efb", },
"texture_filename": "efb1_n000022_40x28_6" "tag_to_actions": {},
}, "tags": [],
{ "target_to_actions": {
"type": "efb", "0": [],
"texture_filename": "efb1_n000021_80x56_6" "1": [],
}, "2": []
{ },
"type": "efb", "targets": [
"texture_filename": "efb1_n000020_160x112_6" {
}, "id": "1759966615601106229",
{ "name": "",
"type": "efb", "tags": [
"texture_filename": "efb1_n000025_320x224_6" "Bloom"
} ],
] "type": "int"
} },
] {
} "id": "2423050791446092715",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
},
{
"id": "4157223477088026000",
"name": "",
"tags": [
"Bloom"
],
"type": "int"
}
]
}

View file

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

View file

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

View file

@ -1,31 +1,67 @@
{ {
"meta": "actions": [],
{ "assets": [],
"title": "Bloom Texture Definitions", "default_hash_policy": {
"author": "iwubcode" "attributes": ""
}, },
"groups": "meta": {
[ "author": "iwubcode",
{ "description": "",
"name": "Bloom", "mod_version": "",
"targets": [ "schema_version": 1,
{ "title": "Xenoblade Definitions"
"type": "efb", },
"texture_filename": "efb1_n15_20x16_4" "tag_to_actions": {},
}, "tags": [],
{ "target_to_actions": {},
"type": "efb", "targets": [
"texture_filename": "efb1_n9_40x30_4" {
}, "id": "1873769556004204196",
{ "name": "",
"type": "efb", "tags": [
"texture_filename": "efb1_n7_80x58_4" "Bloom"
}, ],
{ "type": "int"
"type": "efb", },
"texture_filename": "efb1_n1_320x228_4" {
} "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"
}
]
}