summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-10-12 20:40:16 -0400
committerAndrew Opalach <andrew@akon.city> 2026-10-12 20:40:16 -0400
commit421eb7e473f0772a7af5884a62b0942151fa302e (patch)
tree76219f8180287526bb11f9983f8a2a548c409146
parentaeb22677767008e995dd2f8390433b918a2cf301 (diff)
downloadWorldTuningTool-421eb7e473f0772a7af5884a62b0942151fa302e.tar.gz
WorldTuningTool-421eb7e473f0772a7af5884a62b0942151fa302e.tar.bz2
WorldTuningTool-421eb7e473f0772a7af5884a62b0942151fa302e.zip
Add SSS parameters and some float steps
Signed-off-by: Andrew Opalach <andrew@akon.city>
-rw-r--r--Config.cs2
-rw-r--r--Plugin.cs141
2 files changed, 93 insertions, 50 deletions
diff --git a/Config.cs b/Config.cs
index 3f9d6ec..680cea5 100644
--- a/Config.cs
+++ b/Config.cs
@@ -51,7 +51,7 @@ namespace WorldTuningTool
public class Config : IConfig
{
public String Name => "WorldTuningTool";
- public String Version => "1.0";
+ public String Version => "0.9.7";
public static string StageToString(StageExt stage)
{
diff --git a/Plugin.cs b/Plugin.cs
index 61553d9..b678356 100644
--- a/Plugin.cs
+++ b/Plugin.cs
@@ -1279,7 +1279,7 @@ namespace WorldTuningTool
{
if (OldParameterNames.TryGetValue(name, out string? newName))
{
- Log.Warn($"Paramter '{name}' renamed to {newName}.");
+ Log.Warn($"Paramter '{name}' renamed to '{newName}'.");
name = newName;
}
foreach (Parameter param in allParameters)
@@ -1763,7 +1763,7 @@ namespace WorldTuningTool
P<float>("Primary Shadow Cascade Max Depth Bias[1]", 0xC0, ParameterType.FLOAT, pStep(0.00001f)),
P<float>("Primary Shadow Cascade Depth Bias[2]", 0x98, ParameterType.FLOAT, pStep(0.00001f)),
P<float>("Primary Shadow Cascade Sloped Depth Bias[2]", 0xB0, ParameterType.FLOAT, pStep(0.00001f)),
- P<float>("Primary Shadow Cascade Max Depth Bias[2]", 0xC8, ParameterType.FLOAT, pStep(0.00001f)),
+ P<float>("Primary Shadow Cascade Max Depth Bias[2]", 0xC8, ParameterType.FLOAT, pStep(0.00001f))
};
private static Parameter[] primaryShadowParameters = {
P<int>("Primary Shadow Sample Num", 0x1DC, ParameterType.INT, pStep(1)),
@@ -1772,7 +1772,7 @@ namespace WorldTuningTool
private static Parameter[] primaryBroadAreaParameters = {
P<float>("Broad Area Shadow Depth Bias", 0x1C4, ParameterType.FLOAT, pStep(0.00001f)),
P<float>("Broad Area Shadow Sloped Depth Bias", 0x1CC, ParameterType.FLOAT, pStep(0.00001f)),
- P<float>("Broad Area Shadow Max Depth Bias", 0x1D4, ParameterType.FLOAT, pStep(0.00001f)),
+ P<float>("Broad Area Shadow Max Depth Bias", 0x1D4, ParameterType.FLOAT, pStep(0.00001f))
};
private static MtObject? sLightProbes = null;
@@ -1906,6 +1906,13 @@ namespace WorldTuningTool
P<float>("SSLR Intensity", 0xB424, ParameterType.FLOAT)
};
+ private static Parameter[] sssParameters = {
+ P<bool>("SSS Enable", 0xE7DC, ParameterType.BOOL),
+ P<float>("SSS Max Distance", 0xE7E4, ParameterType.FLOAT, pStep(1.0f)),
+ P<float>("SSS Edge Sharpness", 0xE7E8, ParameterType.FLOAT, pStep(0.01f)),
+ P<float>("SSS Base Fov", 0xE7E0, ParameterType.FLOAT)
+ };
+
private delegate nint CreateRenderPassesObject(nint unknownPtr1, nint unknownPtr2);
private delegate nint DestroyRenderPassesObject(nint renderPassesObjectInternal, int unknownInt);
private Hook<CreateRenderPassesObject>? createRenderPassesObject;
@@ -2012,15 +2019,15 @@ namespace WorldTuningTool
private nint simpleSkyObject = 0x0;
private static Parameter[] simpleSkyParameters = {
P<float>("Sky Global Intensity", 0x270, ParameterType.COLOR_FACTOR, pStep(0.001f)),
- P<float>("Sky Global Cloud Speed", 0x3A8, ParameterType.FLOAT),
- P<float>("Sky Top Cloud UV Scale[0]", 0x3D0, ParameterType.FLOAT),
- P<float>("Sky Top Cloud UV Scale[1]", 0x3D8, ParameterType.FLOAT),
+ P<float>("Sky Global Cloud Speed", 0x3A8, ParameterType.FLOAT, pStep(0.001f)),
+ P<float>("Sky Top Cloud UV Scale[0]", 0x3D0, ParameterType.FLOAT, pStep(0.0001f)),
+ P<float>("Sky Top Cloud UV Scale[1]", 0x3D8, ParameterType.FLOAT, pStep(0.0001f)),
P<float>("Sky Blend", 0x3B0, ParameterType.FLOAT, pMinMaxStep(0.0f, 1.0f, 0.0025f)),
P<float>("Sky Water Reflection Factor", 0x7A0, ParameterType.COLOR_FACTOR, pStep(0.001f)),
P<bool>("Sky Fog", 0x3B4, ParameterType.BOOL),
- P<float>("Sky Fog Blend", 0x3B8, ParameterType.FLOAT),
+ P<float>("Sky Fog Blend", 0x3B8, ParameterType.FLOAT, pStep(0.001f)),
P<bool>("Sky DeGamma", 0x3BC, ParameterType.BOOL),
- P<float>("Sky DeGamma Value", 0x3C0, ParameterType.FLOAT),
+ P<float>("Sky DeGamma Value", 0x3C0, ParameterType.FLOAT, pStep(0.025f)),
P<float>("Sky Cloud Highlight Intensity", 0x3C4, ParameterType.FLOAT),
P<float>("Sky Cloud Shadow Intensity", 0x3C8, ParameterType.FLOAT),
P<float>("Sky Cloud Contrast", 0x3CC, ParameterType.FLOAT),
@@ -2028,22 +2035,22 @@ namespace WorldTuningTool
P<float>("Sky Sun Size", 0x2A8, ParameterType.FLOAT),
P<float>("Sky Sun Rotation Y", 0x3A4, ParameterType.FLOAT),
P<float>("Sky Sun Height", 0x39C, ParameterType.FLOAT, pStep(0.0001f)),
- P<float>("Sky Sun Light Mask Height Adjustment", 0x3A0, ParameterType.FLOAT),
- P<float>("Sky Sun Light Mask Transparency", 0x2CC, ParameterType.FLOAT),
- P<float>("Sky Sun Light Mask UV Scale", 0x2D0, ParameterType.FLOAT),
+ P<float>("Sky Sun Light Mask Height Adjustment", 0x3A0, ParameterType.FLOAT, pStep(0.001f)),
+ P<float>("Sky Sun Light Mask Transparency", 0x2CC, ParameterType.FLOAT, pStep(0.001f)),
+ P<float>("Sky Sun Light Mask UV Scale", 0x2D0, ParameterType.FLOAT, pStep(0.001f)),
P<float>("Sky Sun Bloom Intensity", 0x2AC, ParameterType.FLOAT),
- P<float>("Sky Sun Bloom Transparency Coefficient", 0x2B0, ParameterType.FLOAT),
+ P<float>("Sky Sun Bloom Transparency Coefficient", 0x2B0, ParameterType.FLOAT, pStep(0.025f)),
P<float>("Sky Sun Bloom Threshold", 0x2B4, ParameterType.FLOAT),
P<float>("Sky Sun Bloom Dispersion", 0x2B8, ParameterType.FLOAT),
P<float>("Sky Sun Bloom Downsample Count", 0x2C0, ParameterType.FLOAT),
- P<float>("Sky Sun Bloom Reduction Resolution", 0x2C4, ParameterType.FLOAT),
+ P<int>("Sky Sun Bloom Reduction Resolution", 0x2C4, ParameterType.INT, pStep(1)),
P<float>("Sky Sun Light Sky Color", 0x2E0, ParameterType.COLOR_FACTOR, pStep(0.001f)),
- P<float>("Sky Sun Light Sky Mask UV Scale", 0x2F0, ParameterType.FLOAT),
+ P<float>("Sky Sun Light Sky Mask UV Scale", 0x2F0, ParameterType.FLOAT, pStep(0.001f)),
P<float>("Sky Base Fov", 0x2BC, ParameterType.FLOAT),
P<float>("Sky Base Map Factor", 0x3E0, ParameterType.COLOR_FACTOR, pStep(0.001f)),
- P<float>("Sky Base Side Cloud UV Offset", 0x3F0, ParameterType.FLOAT),
- P<float>("Sky Base Top Cloud0 UV Offset", 0x3F8, ParameterType.FLOAT),
- P<float>("Sky Base Top Cloud1 UV Offset", 0x400, ParameterType.FLOAT),
+ P<float>("Sky Base Side Cloud UV Offset", 0x3F0, ParameterType.FLOAT, pStep(0.001f)),
+ P<float>("Sky Base Top Cloud0 UV Offset", 0x3F8, ParameterType.FLOAT, pStep(0.001f)),
+ P<float>("Sky Base Top Cloud1 UV Offset", 0x400, ParameterType.FLOAT, pStep(0.001f)),
P<float>("Sky Base Sun Cloud Highlight Color[0]", 0x440, ParameterType.COLOR_FACTOR),
P<float>("Sky Base Sun Cloud Shadow Color[0]", 0x480, ParameterType.COLOR_FACTOR),
P<float>("Sky Base Middle Highlight Color[0]", 0x4C0, ParameterType.COLOR_FACTOR),
@@ -2076,10 +2083,10 @@ namespace WorldTuningTool
P<float>("Sky Base Background Shadow Color[3]", 0x5B0, ParameterType.COLOR_FACTOR),
P<float>("Sky Base Cloud Speed[3]", 0x420, ParameterType.VECTOR2),
P<float>("Sky Base Cloud Alpha[3]", 0x434, ParameterType.FLOAT),
- P<float>("Sky Blend Base Map Factor", 0x5C0, ParameterType.COLOR_FACTOR),
- P<float>("Sky Blend Side Cloud UV Offset", 0x5D0, ParameterType.FLOAT),
- P<float>("Sky Blend Top Cloud0 UV Offset", 0x5D8, ParameterType.FLOAT),
- P<float>("Sky Blend Top Cloud1 UV Offset", 0x5E0, ParameterType.FLOAT),
+ P<float>("Sky Blend Base Map Factor", 0x5C0, ParameterType.COLOR_FACTOR, pStep(0.001f)),
+ P<float>("Sky Blend Side Cloud UV Offset", 0x5D0, ParameterType.FLOAT, pStep(0.001f)),
+ P<float>("Sky Blend Top Cloud0 UV Offset", 0x5D8, ParameterType.FLOAT, pStep(0.001f)),
+ P<float>("Sky Blend Top Cloud1 UV Offset", 0x5E0, ParameterType.FLOAT, pStep(0.001f)),
P<float>("Sky Blend Sun Cloud Highlight Color[0]", 0x620, ParameterType.COLOR_FACTOR),
P<float>("Sky Blend Sun Cloud Shadow Color[0]", 0x660, ParameterType.COLOR_FACTOR),
P<float>("Sky Blend Middle Highlight Color[0]", 0x6A0, ParameterType.COLOR_FACTOR),
@@ -2112,7 +2119,7 @@ namespace WorldTuningTool
P<float>("Sky Blend Background Shadow Color[3]", 0x790, ParameterType.COLOR_FACTOR),
P<float>("Sky Blend Cloud Speed[3]", 0x600, ParameterType.VECTOR2),
P<float>("Sky Blend Cloud Alpha[3]", 0x614, ParameterType.FLOAT),
- P<float>("Sky Starry Sky Map Factor", 0x290, ParameterType.COLOR_FACTOR, pStep(0.001f)),
+ P<float>("Sky Starry Sky Map Factor", 0x290, ParameterType.COLOR_FACTOR, pStep(0.001f))
};
private delegate nint CreateFogObject();
@@ -2129,26 +2136,9 @@ namespace WorldTuningTool
private static MtObject? sMhSpeedTree = null;
private static Parameter[] speedTreeParameters = {
- //P<bool>("Speed Tree is Active", 0x339, ParameterType.BOOL),
P<bool>("Speed Tree Wind Active", 0x33A, ParameterType.BOOL),
- //P<bool>("Speed Tree System Wind Active", 0x33C, ParameterType.BOOL),
- //P<bool>("Speed Tree Disp Off Water Reflection", 0x33B, ParameterType.BOOL),
P<float>("Speed Tree Wind Direction", 0x210 + 0x30, ParameterType.VECTOR3),
- P<float>("Speed Tree Wind Strength", 0x210 + 0x40, ParameterType.FLOAT),
- /*
- P<float>("Speed Tree Wind Strength Response", 0x210 + 0x44, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Direction Response", 0x210 + 0x48, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Gust Frequency", 0x210 + 0x4C, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Gust Strength Min", 0x210 + 0x50, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Gust Strength Max", 0x210 + 0x54, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Gust Duration Min", 0x210 + 0x58, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Gust Duration Max", 0x210 + 0x5C, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Gust Rise Scalar", 0x210 + 0x60, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Gust Fall Scalar", 0x210 + 0x64, ParameterType.FLOAT),
- P<bool>("Speed Tree Wind Gust Enable", 0x210 + 0x68, ParameterType.BOOL),
- P<float>("Speed Tree Wind Instance Delay", 0x32C, ParameterType.FLOAT),
- P<float>("Speed Tree Wind Blend Length", 0x328, ParameterType.FLOAT)
- */
+ P<float>("Speed Tree Wind Strength", 0x210 + 0x40, ParameterType.FLOAT)
};
private delegate nint CreateWaterWaveObject(nint unknownPtr);
@@ -2212,6 +2202,7 @@ namespace WorldTuningTool
.Concat(exposureParameters)
.Concat(brightnessParameters)
.Concat(sslrParameters)
+ .Concat(sssParameters)
.Concat(bloomParameters)
.Concat(dofParameters)
.Concat(motionBlurParameters)
@@ -3038,6 +3029,11 @@ namespace WorldTuningTool
param.Update(sMhScene!.Instance);
}
+ foreach (Parameter param in sssParameters)
+ {
+ param.Update(sMhScene!.Instance);
+ }
+
foreach (Parameter param in brightnessParameters)
{
param.Update(sMhRender!.Instance);
@@ -4165,7 +4161,7 @@ namespace WorldTuningTool
PatchConfig patches = config.Patches;
#if SHADER_FEATURES
- ImGui.Text("Shader (Requires Restart):");
+ ImGui.Text("Shader (Requires Restart)");
ImGui.Separator();
if (ImGui.Checkbox("Full Resolution Screen Space Reflections", ref fullResSSLR))
{
@@ -4216,7 +4212,7 @@ namespace WorldTuningTool
}
#endif
- ImGui.Text("General:");
+ ImGui.Text("General");
ImGui.Separator();
if (ImGui.Checkbox("Volume Rendering Full Resolution Blur Pass (Requires Area Change)", ref fullResVolumeBlur))
{
@@ -4361,13 +4357,13 @@ namespace WorldTuningTool
}
}
- bool expanded = ImGui.CollapsingHeader("Parameters");
+ bool expand = ImGui.CollapsingHeader("Parameters");
if (ImGui.BeginItemTooltip())
{
ImGui.Text("(Original: X) may be inaccurate for various reasons, such as\n 1. The game set the parameter to the same value as an override from this mod.\n 2. The game is dynamically updating the parameter in a location unknown to this mod.");
ImGui.EndTooltip();
}
- if (expanded)
+ if (expand)
{
hqMode.Draw(width);
@@ -4393,7 +4389,13 @@ namespace WorldTuningTool
ImGui.PopID();
ImGui.PushID("LOD");
- if (ImGui.CollapsingHeader("LODs"))
+ expand = ImGui.CollapsingHeader("LODs");
+ if (ImGui.BeginItemTooltip())
+ {
+ ImGui.Text("Level of Detail");
+ ImGui.EndTooltip();
+ }
+ if (expand)
{
ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in lodParameters)
@@ -4483,7 +4485,13 @@ namespace WorldTuningTool
ImGui.PopID();
ImGui.PushID("SSAO");
- if (ImGui.CollapsingHeader("SSAO"))
+ expand = ImGui.CollapsingHeader("SSAO");
+ if (ImGui.BeginItemTooltip())
+ {
+ ImGui.Text("Screen Space Ambient Occlusion");
+ ImGui.EndTooltip();
+ }
+ if (expand)
{
ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in ssaoParameters)
@@ -4550,7 +4558,13 @@ namespace WorldTuningTool
ImGui.PopID();
ImGui.PushID("SSLR");
- if (ImGui.CollapsingHeader("SSLR"))
+ expand = ImGui.CollapsingHeader("SSLR");
+ if (ImGui.BeginItemTooltip())
+ {
+ ImGui.Text("Screen Space Local Reflections");
+ ImGui.EndTooltip();
+ }
+ if (expand)
{
ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in sslrParameters)
@@ -4560,6 +4574,23 @@ namespace WorldTuningTool
}
ImGui.PopID();
+ ImGui.PushID("SSS");
+ expand = ImGui.CollapsingHeader("SSS");
+ if (ImGui.BeginItemTooltip())
+ {
+ ImGui.Text("Subsurface Scattering");
+ ImGui.EndTooltip();
+ }
+ if (expand)
+ {
+ ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ foreach (Parameter param in sssParameters)
+ {
+ param.Draw(width);
+ }
+ }
+ ImGui.PopID();
+
/*
ImGui.PushID("Render Passes");
if (ImGui.CollapsingHeader("Render Passes"))
@@ -4686,7 +4717,13 @@ namespace WorldTuningTool
ImGui.PopID();
ImGui.PushID("FXAA");
- if (ImGui.CollapsingHeader("FXAA"))
+ expand = ImGui.CollapsingHeader("FXAA");
+ if (ImGui.BeginItemTooltip())
+ {
+ ImGui.Text("Fast Approximate Anti-Aliasing");
+ ImGui.EndTooltip();
+ }
+ if (expand)
{
ImGui.Text($"Address: 0x{fxaaObject:X}");
if (fxaaObject != 0x0)
@@ -4700,7 +4737,13 @@ namespace WorldTuningTool
ImGui.PopID();
ImGui.PushID("TAA");
- if (ImGui.CollapsingHeader("TAA"))
+ expand = ImGui.CollapsingHeader("TAA");
+ if (ImGui.BeginItemTooltip())
+ {
+ ImGui.Text("Temporal Anti-Aliasing");
+ ImGui.EndTooltip();
+ }
+ if (expand)
{
ImGui.Text($"Address: 0x{taaObject:X}");
if (taaObject != 0x0)