Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 67 additions & 12 deletions src/games/avatarfop-swoutlaws/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ renodx::utils::settings::Settings settings = {
.label = "Tone Mapper",
.section = "Tone Mapping & Color Grading",
.tooltip = "Sets the tone mapper type",
.labels = {"Vanilla", "None", "Neutwo"},
.labels = {"Vanilla", "None", "RenoDX"},
},
new renodx::utils::settings::Setting{
.key = "ToneMapPeakNits",
Expand All @@ -61,7 +61,7 @@ renodx::utils::settings::Settings settings = {
.tooltip = "Sets the value of 100% white in nits",
.min = 48.f,
.max = 500.f,
.is_enabled = []() { return shader_injection.tone_map_type != 0; },
.is_enabled = []() { return shader_injection.tone_map_type != 0.f; },
},
new renodx::utils::settings::Setting{
.key = "SDREOTFEmulation",
Expand All @@ -71,8 +71,19 @@ renodx::utils::settings::Settings settings = {
.label = "SDR EOTF Emulation",
.section = "Tone Mapping & Color Grading",
.tooltip = "Emulates a 2.2 EOTF",
.labels = {"Off", "2.2 (Per Channel)", "2.2 (By Luminosity)"},
.is_enabled = []() { return shader_injection.tone_map_type != 0; },
.labels = {"Off", "2.2 (Per Channel)", "2.2 (By Luminance)"},
.is_enabled = []() { return shader_injection.tone_map_type != 0.f; },
},
new renodx::utils::settings::Setting{
.key = "ToneMapHueEmulation",
.binding = &shader_injection.tone_map_hue_emulation,
.default_value = 0.f,
.label = "BT.2020 Hue Emulation",
.section = "Tone Mapping & Color Grading",
.tooltip = "Emulates hue shifts from BT.2020 per-channel tonemapping.",
.max = 100.f,
.is_enabled = []() { return shader_injection.tone_map_type != 0.f; },
.parse = [](float value) { return value * 0.01f; },
},
new renodx::utils::settings::Setting{
.key = "ToneMapWhiteClip",
Expand All @@ -94,6 +105,17 @@ renodx::utils::settings::Settings settings = {
.format = "%.2f",
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeGamma",
.binding = &shader_injection.tone_map_gamma,
.default_value = 1.f,
.label = "Gamma",
.section = "Tone Mapping & Color Grading",
.min = 0.75f,
.max = 1.25f,
.format = "%.2f",
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeHighlights",
.binding = &shader_injection.tone_map_highlights,
Expand All @@ -104,6 +126,16 @@ renodx::utils::settings::Settings settings = {
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
.parse = [](float value) { return value * 0.02f; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeHighlightContrast",
.binding = &shader_injection.tone_map_contrast_highlights,
.default_value = 45.f,
.label = "Highlight Contrast",
.section = "Tone Mapping & Color Grading",
.max = 100.f,
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
.parse = [](float value) { return value * 0.02f; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeShadows",
.binding = &shader_injection.tone_map_shadows,
Expand All @@ -114,6 +146,16 @@ renodx::utils::settings::Settings settings = {
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
.parse = [](float value) { return value * 0.02f; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeShadowContrast",
.binding = &shader_injection.tone_map_contrast_shadows,
.default_value = 50.f,
.label = "Shadow Contrast",
.section = "Tone Mapping & Color Grading",
.max = 100.f,
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
.parse = [](float value) { return value * 0.02f; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeContrast",
.binding = &shader_injection.tone_map_contrast,
Expand All @@ -124,6 +166,16 @@ renodx::utils::settings::Settings settings = {
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
.parse = [](float value) { return value * 0.02f; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeAdaptationContrast",
.binding = &shader_injection.tone_map_adaptation_contrast,
.default_value = 50.f,
.label = "Adaptation Contrast",
.section = "Tone Mapping & Color Grading",
.max = 100.f,
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
.parse = [](float value) { return value * 0.02f; },
},
new renodx::utils::settings::Setting{
.key = "ColorGradeSaturation",
.binding = &shader_injection.tone_map_saturation,
Expand Down Expand Up @@ -165,7 +217,7 @@ renodx::utils::settings::Settings settings = {
.tooltip = "Flare/Glare Compensation",
.max = 100.f,
.is_enabled = []() { return shader_injection.tone_map_type != 0 && shader_injection.tone_map_type != 3; },
.parse = [](float value) { return value * 0.02f; },
.parse = [](float value) { return value * 0.01f; },
},
// new renodx::utils::settings::Setting{
// .key = "ColorGradeLUTStrength",
Expand Down Expand Up @@ -231,12 +283,9 @@ renodx::utils::settings::Settings settings = {
.on_change = []() {
renodx::utils::settings::ResetSettings();
renodx::utils::settings::UpdateSettings({
{"SDREOTFEmulation", 0.f},
{"ToneMapWhiteClip", 41.f},
{"ColorGradeHighlights", 42.f},
{"ColorGradeShadows", 80.f},
{"ColorGradeSaturation", 52.f},
{"ColorGradeFlare", 36.f},
{"ColorGradeHighlightContrast", 50.f},
{"ColorGradeContrast", 42.f},
{"ColorGradeSaturation", 48.f},
});
},
},
Expand Down Expand Up @@ -317,10 +366,16 @@ void OnPresetOff() {
{"ToneMapUINits", 203.f},
{"SDREOTFEmulation", 0.f},
{"UISDREOTFEmulation", 0.f},
{"ToneMapHueEmulation", 0.f},
{"ToneMapWhiteClip", 100.f},
{"ColorGradeExposure", 1.f},
{"ColorGradeGamma", 1.f},
{"ColorGradeHighlights", 50.f},
{"ColorGradeHighlightContrast", 50.f},
{"ColorGradeShadows", 50.f},
{"ColorGradeShadowContrast", 50.f},
{"ColorGradeContrast", 50.f},
{"ColorGradeAdaptationContrast", 50.f},
{"ColorGradeSaturation", 50.f},
{"ColorGradeHighlightSaturation", 50.f},
{"ColorGradeDechroma", 0.f},
Expand Down Expand Up @@ -374,4 +429,4 @@ BOOL APIENTRY DllMain(HMODULE h_module, DWORD fdw_reason, LPVOID lpv_reserved) {
renodx::mods::shader::Use(fdw_reason, custom_shaders, &shader_injection);

return TRUE;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "..\lutbuilder.hlsli"
#include "..\..\lutbuilder.hlsli"

cbuffer CB0_buf : register(b2200, space0) {
float3 CB0_m0 : packoffset(c0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "..\lutbuilder.hlsli"
#include "..\..\lutbuilder.hlsli"

cbuffer CB0_buf : register(b2200, space0) {
float3 CB0_m0 : packoffset(c0);
Expand Down
Loading
Loading