forked from dolphin-emu/dolphin
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'a9544510468740b77cf06ef28daaa65fe247fd32' into upstream…
…-merge-2024-06-09
- Loading branch information
Showing
503 changed files
with
77,247 additions
and
57,380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
include(RemoveCompileFlag) | ||
|
||
macro(dolphin_disable_warnings_msvc _target) | ||
macro(dolphin_disable_warnings _target) | ||
get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS) | ||
if (_target_cxx_flags) | ||
set(new_flags "") | ||
foreach(flag IN LISTS _target_cxx_flags) | ||
# all warning flags start with "/W" or "/w" or "-W" or "-w" | ||
if (NOT "${flag}" MATCHES "^[-/][Ww]") | ||
list(APPEND new_flags "${flag}") | ||
endif() | ||
endforeach() | ||
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${new_flags}") | ||
endif() | ||
if (MSVC) | ||
get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS) | ||
if (_target_cxx_flags) | ||
set(new_flags "") | ||
foreach(flag IN LISTS _target_cxx_flags) | ||
# all warning flags start with "/W" or "/w" or "-W" or "-w" | ||
if (NOT "${flag}" MATCHES "^[-/][Ww]") | ||
list(APPEND new_flags "${flag}") | ||
endif() | ||
endforeach() | ||
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${new_flags}") | ||
endif() | ||
target_compile_options(${_target} PRIVATE "/W0") | ||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||
target_compile_options(${_target} PRIVATE "-w") | ||
endif() | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# G5BE4Z - Strike Force Bowling | ||
[Video_Hacks] | ||
EFBToTextureEnable = False | ||
DeferEFBCopies = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# REGE36, REGP36 - Emergency Mayhem | ||
[Core] | ||
# Dual core causes hang on loading | ||
CPUThread = False |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"meta": | ||
{ | ||
"title": "Bloom Texture Definitions", | ||
"author": "SuperSamus" | ||
}, | ||
"groups": | ||
[ | ||
{ | ||
"name": "Bloom", | ||
"targets": [ | ||
{ | ||
"type": "efb", | ||
"texture_filename": "efb1_n000007_80x57_6" | ||
} | ||
] | ||
} | ||
] | ||
} |
Empty file.
19 changes: 19 additions & 0 deletions
19
Data/Sys/Load/GraphicMods/Skylanders Trap Team/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"meta": | ||
{ | ||
"title": "Bloom Texture Definitions", | ||
"author": "SuperSamus" | ||
}, | ||
"groups": | ||
[ | ||
{ | ||
"name": "Bloom", | ||
"targets": [ | ||
{ | ||
"type": "efb", | ||
"texture_filename": "efb1_n000005_320x228_6" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/* | ||
[configuration] | ||
[OptionRangeFloat] | ||
GUIName = Amplificiation | ||
OptionName = AMPLIFICATION | ||
MinValue = 1.0 | ||
MaxValue = 6.0 | ||
StepAmount = 0.25 | ||
DefaultValue = 2.5 | ||
[/configuration] | ||
*/ | ||
|
||
// ICtCP Colorspace as defined by Dolby here: | ||
// https://professional.dolby.com/siteassets/pdfs/ictcp_dolbywhitepaper_v071.pdf | ||
|
||
/***** Transfer Function *****/ | ||
|
||
const float a = 0.17883277; | ||
const float b = 1.0 - 4.0 * a; | ||
const float c = 0.5 - a * log(4.0 * a); | ||
|
||
float HLG_f(float x) | ||
{ | ||
if (x < 0.0) { | ||
return 0.0; | ||
} | ||
|
||
else if (x < 1.0 / 12.0) { | ||
return sqrt(3.0 * x); | ||
} | ||
|
||
return a * log(12.0 * x - b) + c; | ||
} | ||
|
||
float HLG_inv_f(float x) | ||
{ | ||
if (x < 0.0) { | ||
return 0.0; | ||
} | ||
|
||
else if (x < 1.0 / 2.0) { | ||
return x * x / 3.0; | ||
} | ||
|
||
return (exp((x - c) / a) + b) / 12.0; | ||
} | ||
|
||
float4 HLG(float4 lms) | ||
{ | ||
return float4(HLG_f(lms.x), HLG_f(lms.y), HLG_f(lms.z), lms.w); | ||
} | ||
|
||
float4 HLG_inv(float4 lms) | ||
{ | ||
return float4(HLG_inv_f(lms.x), HLG_inv_f(lms.y), HLG_inv_f(lms.z), lms.w); | ||
} | ||
|
||
/***** Linear <--> ICtCp *****/ | ||
|
||
const mat4 RGBtoLMS = mat4( | ||
1688.0, 683.0, 99.0, 0.0, | ||
2146.0, 2951.0, 309.0, 0.0, | ||
262.0, 462.0, 3688.0, 0.0, | ||
0.0, 0.0, 0.0, 4096.0) | ||
/ 4096.0; | ||
|
||
const mat4 LMStoICtCp = mat4( | ||
+2048.0, +3625.0, +9500.0, 0.0, | ||
+2048.0, -7465.0, -9212.0, 0.0, | ||
+0.0, +3840.0, -288.0, 0.0, | ||
+0.0, +0.0, +0.0, 4096.0) | ||
/ 4096.0; | ||
|
||
float4 LinearRGBToICtCP(float4 c) | ||
{ | ||
return LMStoICtCp * HLG(RGBtoLMS * c); | ||
} | ||
|
||
/***** ICtCp <--> Linear *****/ | ||
|
||
mat4 ICtCptoLMS = inverse(LMStoICtCp); | ||
mat4 LMStoRGB = inverse(RGBtoLMS); | ||
|
||
float4 ICtCpToLinearRGB(float4 c) | ||
{ | ||
return LMStoRGB * HLG_inv(ICtCptoLMS * c); | ||
} | ||
|
||
void main() | ||
{ | ||
float4 color = Sample(); | ||
|
||
// Nothing to do here, we are in SDR | ||
if (!OptionEnabled(hdr_output) || !OptionEnabled(linear_space_output)) { | ||
SetOutput(color); | ||
return; | ||
} | ||
|
||
// Renormalize Color to be in [0.0 - 1.0] SDR Space. We will revert this later. | ||
const float hdr_paper_white = hdr_paper_white_nits / hdr_sdr_white_nits; | ||
color.rgb /= hdr_paper_white; | ||
|
||
// Convert Color to Perceptual Color Space. This will allow us to do perceptual | ||
// scaling while also being able to use the luminance channel. | ||
float4 ictcp_color = LinearRGBToICtCP(color); | ||
|
||
// Scale the color in perceptual space depending on the percieved luminance. | ||
// | ||
// At low luminances, ~0.0, pow(AMPLIFICATION, ~0.0) ~= 1.0, so the | ||
// color will appear to be unchanged. This is important as we don't want to | ||
// over expose dark colors which would not have otherwise been seen. | ||
// | ||
// At high luminances, ~1.0, pow(AMPLIFICATION, ~1.0) ~= AMPLIFICATION, | ||
// which is equivilant to scaling the color by AMPLIFICATION. This is | ||
// important as we want to get the most out of the display, and we want to | ||
// get bright colors to hit their target brightness. | ||
// | ||
// For more information, see this desmos demonstrating this scaling process: | ||
// https://www.desmos.com/calculator/syjyrjsj5c | ||
float exposure = length(ictcp_color.xyz); | ||
ictcp_color *= pow(HLG_f(AMPLIFICATION), exposure); | ||
|
||
// Convert back to Linear RGB and output the color to the display. | ||
// We use hdr_paper_white to renormalize the color to the comfortable | ||
// SDR viewing range. | ||
SetOutput(hdr_paper_white * ICtCpToLinearRGB(ictcp_color)); | ||
} |
Oops, something went wrong.