summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-10-28 00:48:23 -0400
committerAndrew Opalach <andrew@akon.city> 2026-10-28 00:48:23 -0400
commitf812a34a217a441f7d9df57861aa52be6b1dbd9b (patch)
tree1b6f23771aa3bc237a90c409033e9fac07d5723b
parentf18eea16e23ad3739e9bc790a1a334e1dcaf5348 (diff)
downloadWorldTuningTool-f812a34a217a441f7d9df57861aa52be6b1dbd9b.tar.gz
WorldTuningTool-f812a34a217a441f7d9df57861aa52be6b1dbd9b.tar.bz2
WorldTuningTool-f812a34a217a441f7d9df57861aa52be6b1dbd9b.zip
More imgui navigation tweaks, improve patches
Signed-off-by: Andrew Opalach <andrew@akon.city>
-rw-r--r--LUT.cs46
-rw-r--r--Lights.cs46
-rw-r--r--Plugin.cs566
3 files changed, 319 insertions, 339 deletions
diff --git a/LUT.cs b/LUT.cs
index a3aa536..941e4a6 100644
--- a/LUT.cs
+++ b/LUT.cs
@@ -2,10 +2,8 @@
using System.Text;
using System.Numerics;
-using System.Runtime.InteropServices;
using ImGuiNET;
-using SharpPluginLoader.Core.Memory;
using SharpPluginLoader.Core.IO;
#if TEXTURE_FEATURE
using SharpPluginLoader.Core.Resources;
@@ -15,7 +13,7 @@ namespace WorldTuningTool
{
using static Utility;
- internal static class WorldLUTs
+ internal static class Lut
{
private const string addPath = "nativePC/plugins/CSharp/LUT";
@@ -44,7 +42,7 @@ namespace WorldTuningTool
};
// https://github.com/AsteriskAmpersand/CrappyLUTStudio--CLUTS-/blob/5af10daaa5f295b106cc5db09530a6fe5a4320d4/LUT.py#L35
- private static byte[]? parseWorldLUT(BinaryReader reader)
+ private static byte[]? parseWorldLut(BinaryReader reader)
{
byte[] signature = reader.ReadBytes(4);
if (!(signature[0] == 0x54 && signature[1] == 0x45 && signature[2] == 0x58 && signature[3] == 0x0))
@@ -67,7 +65,7 @@ namespace WorldTuningTool
// https://drive.google.com/file/d/143Eh08ZYncCAMwJ1q4gWxVOqR_OSWYvs/view
// When does DOMAIN_MIN/MAX apply?
- private static byte[]? parseCubeLUT(StreamReader reader)
+ private static byte[]? parseCubeLut(StreamReader reader)
{
string? line;
Vector3[]? parsed = null;
@@ -80,7 +78,10 @@ namespace WorldTuningTool
{
dim = Convert.ToInt32(line.Split(' ').Last());
}
- catch (Exception) { return null; }
+ catch (Exception)
+ {
+ return null;
+ }
if (dim != 32) return null;
parsed = new Vector3[dim * dim * dim];
while ((line = reader.ReadLine()) != null)
@@ -99,7 +100,10 @@ namespace WorldTuningTool
{
parsed[i++] = StringToVector3(line, ' ');
}
- catch (Exception) { return null; }
+ catch (Exception)
+ {
+ return null;
+ }
}
}
if (parsed == null)
@@ -135,14 +139,14 @@ namespace WorldTuningTool
{
using (StreamReader reader = new StreamReader(stream))
{
- data = parseCubeLUT(reader);
+ data = parseCubeLut(reader);
}
}
else
{
using (BinaryReader reader = new BinaryReader(stream, Encoding.ASCII, false))
{
- data = parseWorldLUT(reader);
+ data = parseWorldLut(reader);
}
}
if (data == null)
@@ -181,7 +185,7 @@ namespace WorldTuningTool
return success;
}
- private static void reloadBlendLUT(nint lightingObject)
+ private static void reloadBlendLut(nint lightingObject)
{
GetRef<float>(lightingObject, 0x1D4) = GetRef<float>(lightingObject, 0x1D0) + 1.0f;
}
@@ -189,9 +193,15 @@ namespace WorldTuningTool
private static string[] fileList = [];
private static string[] selectedFile = [ "", "" ];
private static bool[] selectionStarted = [ false, false ];
- private static bool[] selectedInvalid = [ false, false ];
+ private static bool[] selectionInvalid = [ false, false ];
+
+ internal static void clearState()
+ {
+ selectedFile = [ "", "" ];
+ selectionInvalid = [ false, false ];
+ }
- internal static unsafe void drawUI(nint texture, nint lightingObject, int i, float width)
+ internal static unsafe void drawLut(nint texture, nint lightingObject, int i, float width)
{
ImGui.PushID(i);
string lutPath = new(GetPtrInline<sbyte>(texture, 0xC));
@@ -201,14 +211,14 @@ namespace WorldTuningTool
{
if (overwriteFromMtFile(texture, $"native:\\{lutPath}.tex"))
{
- reloadBlendLUT(lightingObject);
+ reloadBlendLut(lightingObject);
}
selectedFile[i] = "";
- selectedInvalid[i] = false;
+ selectionInvalid[i] = false;
}
ImGui.SameLine();
ImGui.SetNextItemWidth(width * 0.6f);
- bool prevWasInvalid = selectedInvalid[i];
+ bool prevWasInvalid = selectionInvalid[i];
if (prevWasInvalid)
{
ImGui.PushStyleColor(ImGuiCol.Text, 0xFF0000FF);
@@ -228,7 +238,7 @@ namespace WorldTuningTool
selectedFile[i] = nativePath;
if (overwriteFromMtFile(texture, nativePath))
{
- reloadBlendLUT(lightingObject);
+ reloadBlendLut(lightingObject);
}
}
if (isSelected) ImGui.SetItemDefaultFocus();
@@ -245,9 +255,9 @@ namespace WorldTuningTool
if (ImGui.Selectable(fileName, isSelected))
{
selectedFile[i] = fileName;
- if (!(selectedInvalid[i] = !overwriteFromFile(texture, filePath)))
+ if (!(selectionInvalid[i] = !overwriteFromFile(texture, filePath)))
{
- reloadBlendLUT(lightingObject);
+ reloadBlendLut(lightingObject);
}
}
if (isSelected) ImGui.SetItemDefaultFocus();
diff --git a/Lights.cs b/Lights.cs
index c65645b..d151a89 100644
--- a/Lights.cs
+++ b/Lights.cs
@@ -125,9 +125,7 @@ namespace WorldTuningTool
{
public override string Name => "uMhActorInfiniteLight";
- public uMhActorInfiniteLight(nint lightObject) : base(lightObject)
- {
- }
+ public uMhActorInfiniteLight(nint lightObject) : base(lightObject) { }
}
private class uLlkInfiniteLight : uInfiniteLight
@@ -151,18 +149,14 @@ namespace WorldTuningTool
{
public override string Name => "uLlkActorInfiniteLight";
- public uLlkActorInfiniteLight(nint lightObject) : base(lightObject)
- {
- }
+ public uLlkActorInfiniteLight(nint lightObject) : base(lightObject) { }
}
private class uLlkFollowCameraInfiniteLight : uLlkInfiniteLight
{
public override string Name => "uLlkFollowCameraInfiniteLight";
- public uLlkFollowCameraInfiniteLight(nint lightObject) : base(lightObject)
- {
- }
+ public uLlkFollowCameraInfiniteLight(nint lightObject) : base(lightObject) { }
}
private class uPointLight : uLight
@@ -213,9 +207,7 @@ namespace WorldTuningTool
{
public override string Name => "uMhActorPointLight";
- public uMhActorPointLight(nint lightObject) : base(lightObject)
- {
- }
+ public uMhActorPointLight(nint lightObject) : base(lightObject) { }
}
private class uLlkPointLight : uPointLight
@@ -258,18 +250,14 @@ namespace WorldTuningTool
{
public override string Name => "uLlkActorPointLight";
- public uLlkActorPointLight(nint lightObject) : base(lightObject)
- {
- }
+ public uLlkActorPointLight(nint lightObject) : base(lightObject) { }
}
private class uLlkFollowCameraPointLight : uLlkPointLight
{
public override string Name => "uLlkFollowCameraPointLight";
- public uLlkFollowCameraPointLight(nint lightObject) : base(lightObject)
- {
- }
+ public uLlkFollowCameraPointLight(nint lightObject) : base(lightObject) { }
}
private class uSpotLight : uLight
@@ -338,9 +326,7 @@ namespace WorldTuningTool
{
public override string Name => "uMhActorSpotLight";
- public uMhActorSpotLight(nint lightObject) : base(lightObject)
- {
- }
+ public uMhActorSpotLight(nint lightObject) : base(lightObject) { }
}
private class uLlkSpotLight : uSpotLight
@@ -387,27 +373,21 @@ namespace WorldTuningTool
{
public override string Name => "uLlkActorSpotLight";
- public uLlkActorSpotLight(nint lightObject) : base(lightObject)
- {
- }
+ public uLlkActorSpotLight(nint lightObject) : base(lightObject) { }
}
private class uLlkNullAngleSpotLight : uLlkSpotLight
{
public override string Name => "uLlkNullAngleSpotLight";
- public uLlkNullAngleSpotLight(nint lightObject) : base(lightObject)
- {
- }
+ public uLlkNullAngleSpotLight(nint lightObject) : base(lightObject) { }
}
private class uLlkFollowCameraSpotLight : uLlkSpotLight
{
public override string Name => "uLlkFollowCameraSpotLight";
- public uLlkFollowCameraSpotLight(nint lightObject) : base(lightObject)
- {
- }
+ public uLlkFollowCameraSpotLight(nint lightObject) : base(lightObject) { }
}
private class uHemiSphereLight : uLight
@@ -430,9 +410,7 @@ namespace WorldTuningTool
{
public override string Name => "uMhHemiSphereLight";
- public uMhHemiSphereLight(nint lightObject) : base(lightObject)
- {
- }
+ public uMhHemiSphereLight(nint lightObject) : base(lightObject) { }
public uMhHemiSphereLight(nint lightObject, Vector3 pos) : this(lightObject)
{
@@ -947,7 +925,7 @@ namespace WorldTuningTool
}
}
- internal static unsafe void drawUI(float width)
+ internal static unsafe void drawLights(float width)
{
int lightType = -1;
nint lightObject = 0x0;
diff --git a/Plugin.cs b/Plugin.cs
index dad2dbc..9c49249 100644
--- a/Plugin.cs
+++ b/Plugin.cs
@@ -441,7 +441,7 @@ namespace WorldTuningTool
}
}
- public bool Draw(bool forSet, List<Override>? currentOverrides, List<Override>? stageOverrides, List<Override>? globalOverrides, bool superseded, float width)
+ public byte Draw(bool forSet, List<Override>? currentOverrides, List<Override>? stageOverrides, List<Override>? globalOverrides, bool superseded, float width)
{
Assert(!superseded == isSet);
if (superseded)
@@ -541,7 +541,7 @@ namespace WorldTuningTool
{
ImGui.PopItemFlag();
}
- bool hasStatus = false;
+ byte hasStatus = 0;
if (Param != null)
{
ImGui.SameLine();
@@ -580,7 +580,7 @@ namespace WorldTuningTool
{
ImGui.SameLine();
Param.DrawReferenceValue("Saved", sValueV, sValueInt);
- hasStatus = true;
+ hasStatus = 2;
}
if (Param.PendingUpdate())
{
@@ -593,7 +593,7 @@ namespace WorldTuningTool
ImGui.Text("The type this parameter belongs to has no current object.");
ImGui.EndTooltip();
}
- hasStatus = true;
+ hasStatus = 1;
}
else if (valueDiffers || superseded)
{
@@ -605,7 +605,7 @@ namespace WorldTuningTool
byLine = setByLine(Param, config, stageOverrides, globalOverrides, forSet, false);
}
Param.DrawReferenceValue((byLine == "") ? "Current" : byLine, v4, i1);
- hasStatus = true;
+ hasStatus = 2;
}
}
return hasStatus;
@@ -650,6 +650,7 @@ namespace WorldTuningTool
private static Parameter[] screenRenderParameters = {
P<byte>("Screen Trim", 0x7B440, ParameterType.BYTE, pStep((byte)1)),
+ P<float>("Aspect Ratio", 0x7B444, ParameterType.FLOAT),
P<float>("Default Width", 0x142F74AFC, ParameterType.PATCH_FLOAT),
P<float>("Default Height", 0x142F74AF8, ParameterType.PATCH_FLOAT)
};
@@ -920,14 +921,6 @@ namespace WorldTuningTool
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;
- private Hook<DestroyRenderPassesObject>? destroyRenderPassesObject;
- private nint renderPassesObject = 0x0;
- private static Parameter[] renderPassesParameters = {
- };
-
private delegate nint CreateBloomObject();
private delegate nint CreateBloomObject2(nint unknownPtr);
private delegate nint DestroyBloomObject(nint bloomObjectInternal, int unknownInt);
@@ -1456,28 +1449,40 @@ namespace WorldTuningTool
private Patch value2ForVolumeQuality;
private bool disableLodLimits = false;
- private Patch defaultViewModeLodLimit;
- private Patch defaultViewModeLodLimit_1;
- private Patch defaultViewModeLodLimit_2;
- private Patch defaultViewModeLodLimit_3;
- private Patch defaultViewModeLodLimit_4;
+ private Patch defaultViewModeLodLimit1;
+ private Patch defaultViewModeLodLimit2;
+ private Patch defaultViewModeLodLimit3;
+ private Patch defaultViewModeLodLimit4;
+ private Patch defaultViewModeLodLimit5;
+ private Patch defaultViewModeLodLimit6;
+ private Patch defaultViewModeLodLimit7;
+ private Patch defaultViewModeLodLimit8;
+ private Patch defaultViewModeLodLimit9;
private void disableLodLimitsEnable()
{
- defaultViewModeLodLimit.Enable();
- defaultViewModeLodLimit_1.Enable();
- defaultViewModeLodLimit_2.Enable();
- defaultViewModeLodLimit_3.Enable();
- defaultViewModeLodLimit_4.Enable();
+ defaultViewModeLodLimit1.Enable();
+ defaultViewModeLodLimit2.Enable();
+ defaultViewModeLodLimit3.Enable();
+ defaultViewModeLodLimit4.Enable();
+ defaultViewModeLodLimit5.Enable();
+ defaultViewModeLodLimit6.Enable();
+ defaultViewModeLodLimit7.Enable();
+ defaultViewModeLodLimit8.Enable();
+ defaultViewModeLodLimit9.Enable();
}
private void disableLodLimitsDisable()
{
- defaultViewModeLodLimit.Disable();
- defaultViewModeLodLimit_1.Disable();
- defaultViewModeLodLimit_2.Disable();
- defaultViewModeLodLimit_3.Disable();
- defaultViewModeLodLimit_4.Disable();
+ defaultViewModeLodLimit1.Disable();
+ defaultViewModeLodLimit2.Disable();
+ defaultViewModeLodLimit3.Disable();
+ defaultViewModeLodLimit4.Disable();
+ defaultViewModeLodLimit5.Disable();
+ defaultViewModeLodLimit6.Disable();
+ defaultViewModeLodLimit7.Disable();
+ defaultViewModeLodLimit8.Disable();
+ defaultViewModeLodLimit9.Disable();
}
private Patch defaultCharaCreatorParam;
@@ -1487,11 +1492,24 @@ namespace WorldTuningTool
private Patch addressHigherValueForFoliageSway;
private bool disableReducedRateAnimations = false;
- private bool disableReducedRateAnimations2 = false;
- private Patch zeroFrameSkip;
+ private Patch zeroFrameSkip1;
private Patch zeroFrameSkip2;
private Patch zeroFrameSkip3;
+ private void disableReducedRateAnimationsEnable()
+ {
+ zeroFrameSkip1.Enable();
+ zeroFrameSkip2.Enable();
+ zeroFrameSkip3.Enable();
+ }
+
+ private void disableReducedRateAnimationsDisable()
+ {
+ zeroFrameSkip1.Disable();
+ zeroFrameSkip2.Disable();
+ zeroFrameSkip3.Disable();
+ }
+
private bool viewModeLodOverride = false;
private Patch viewModeAddressLod1;
private Patch viewModeAddressLod2;
@@ -1499,6 +1517,12 @@ namespace WorldTuningTool
private bool nukeEffects = false;
private Patch jmpOverEffects;
+ private static void resetRenderer()
+ {
+ ref byte prevScreenTrim = ref sMhRender!.GetRef<byte>(0x7B43C);
+ prevScreenTrim = (byte)((prevScreenTrim == 0) ? 1 : 0);
+ }
+
public int AddOverride(string name, Vector4 v4, int i1)
{
foreach (Parameter param in allParameters)
@@ -1551,6 +1575,7 @@ namespace WorldTuningTool
{
unchecked
{
+
Instance = this;
PFuncs.HandleShadowResolution = handleShadowResParameter;
@@ -1589,9 +1614,6 @@ namespace WorldTuningTool
createToneMapObject = Hook.Create<CreateToneMapObject>(0x1424CDE20, CreateToneMapObjectHook);
destroyToneMapObject = Hook.Create<DestroyToneMapObject>(0x1424CE380, DestroyToneMapObjectHook);
- createRenderPassesObject = Hook.Create<CreateRenderPassesObject>(0x14255BA70, CreateRenderPassesObjectHook);
- destroyRenderPassesObject = Hook.Create<DestroyRenderPassesObject>(0x14255C710, DestroyRenderPassesObjectHook);
-
createBloomObject = Hook.Create<CreateBloomObject>(0x1424CB3C0, CreateBloomObjectHook);
createBloomObject2 = Hook.Create<CreateBloomObject2>(0x1424CB5E0, CreateBloomObject2Hook);
destroyBloomObject = Hook.Create<DestroyBloomObject>(0x1424CB750, DestroyBloomObjectHook);
@@ -1680,9 +1702,8 @@ namespace WorldTuningTool
broadAreaShadowRes2_Addr = addr;
// The volume blur filter is created at a different place in the code and happens at a different
- // time (area change/createToneMapObject() vs change of Volume Quality setting). It's also rendered
- // in a seperate pass that happens after the initial volume rendering. So keep that in mind if inspecting
- // a frame in renderdoc.
+ // time (createToneMapObject() vs change of Volume Quality setting). It's also rendered in a seperate
+ // pass that happens after the initial volume rendering. So keep that in mind if inspecting a frame.
volumeSars1 = new Patch((nint)0x1424D0159, [0x90, 0x90]);
volumeSars2 = new Patch((nint)0x1424D01A0, [0x90, 0x90]);
volumeSars3 = new Patch((nint)0x1424D01C6, [0x90, 0x90]);
@@ -1713,21 +1734,27 @@ namespace WorldTuningTool
// Gameplay.
addr = PatternScanner.FindFirst(Pattern.FromString("80 BB 34 EC 00 00 00 88 8B 31 EC 00 00 C6 83 30 EC 00 00 00 74 1C C6 83 34 EC 00 00 00 48 8B 0D 68 4B 4F 03 80 B9 58 02 00 00 00 75 05 E8 5A F5 01 00 48 8B CB E8 E2 05 00 00 83 BB DC EB 00 00 06 74 0A C7 83 DC EB 00 00 06 00 00 00"));
Assert(addr == 0x141B1A0B4);
- defaultViewModeLodLimit = new Patch(addr + 0x40, [0x07, 0x74, 0x0A, 0xC7, 0x83, 0xDC, 0xEB, 0x00, 0x00, 0x07]);
+ defaultViewModeLodLimit1 = new Patch(addr + 0x40, [0x07, 0x74, 0x0A, 0xC7, 0x83, 0xDC, 0xEB, 0x00, 0x00, 0x07]);
// In room.
addr = PatternScanner.FindFirst(Pattern.FromString("8B 9F CC 00 00 00 81 FB F9 01 00 00 74 0C 8B CB E8 95 3F 65 01 83 F8 05 75 11 48 8B 0D 61 C8 F6 04 BA 02 00 00 00 E8 DF 2D 8C 01 48 8B 0D A0 C7 F6 04 8B D3"));
Assert(addr == 0x140257AE6);
- defaultViewModeLodLimit_1 = new Patch(addr + 0x22, [0x07]);
+ defaultViewModeLodLimit2 = new Patch(addr + 0x22, [0x7]);
// Forging/Changing Equipment.
addr = PatternScanner.FindFirst(Pattern.FromString("BA 02 00 00 00 E8 6E C0 80 00 48 8B 74 24 38 48 8B 57 28 48 8D 4F 30 E8 4C 79 B4 FE 48 8B 0D 0D FF A6 03 BA 04 00 00 00 E8 8B 64 3C 00 48 8B 05 D4 01 A7 03 80 B8 FD 46 01 00 00"));
Assert(addr == 0x141754438);
- defaultViewModeLodLimit_2 = new Patch(addr + 0x24, [0x07]);
+ defaultViewModeLodLimit3 = new Patch(addr + 0x24, [0x7]);
+ defaultViewModeLodLimit4 = new Patch(0x141DE7CDB + 0x1, [0x7]);
+ defaultViewModeLodLimit5 = new Patch(0x141E0B1A2 + 0x1, [0x7]);
// Talking to NPC.
- defaultViewModeLodLimit_3 = new Patch((nint)0x14128F1AC + 0x1, [0x07]);
- defaultViewModeLodLimit_4 = new Patch((nint)0x14128F1AC + 0xF, [0x07]);
+ defaultViewModeLodLimit6 = new Patch((nint)0x14128F1AC + 0x1, [0x7]);
+ defaultViewModeLodLimit7 = new Patch((nint)0x14128F1AC + 0xF, [0x7]);
+
+ // Oven roast.
+ defaultViewModeLodLimit8 = new Patch((nint)0x14128201C + 0x1, [0x7]);
+ defaultViewModeLodLimit9 = new Patch((nint)0x14126C934 + 0x1, [0x7]);
defaultCharaCreatorParam = new Patch((nint)0x141B1A0C1 + 0x6, [0x1]);
@@ -1736,21 +1763,19 @@ namespace WorldTuningTool
addressHigherValueForFoliageSway = new Patch(addr + 0x7, [0x04]);
// Found using mFrameSkipNum annotation from MHW-DTI-Dumps.
- zeroFrameSkip = new Patch((nint)0x142246948, [0x31, 0xC0, 0x90, 0x90, 0x90, 0x90]);
+ zeroFrameSkip1 = new Patch((nint)0x142246948, [0x31, 0xC0, 0x90, 0x90, 0x90, 0x90]);
+ // I've never observed a frame skip being set at the location of zeroFrameSkip2/3.
zeroFrameSkip2 = new Patch((nint)0x142641888, [0x31, 0xC0, 0x90, 0x90, 0x90, 0x90]);
zeroFrameSkip3 = new Patch((nint)0x14237AD75, [0x31, 0xC0, 0x90, 0x90, 0x90, 0x90]);
viewModeAddressLod1 = new Patch((nint)0x141B19A6C + 0x4, [0x1C, 0x02, 0x00, 0x00]);
viewModeAddressLod2 = new Patch((nint)0x141B19B7C + 0x4, [0x20, 0x02, 0x00, 0x00]);
- // vTable of Interest: 0x1433B8730.
- jmpOverEffects = new Patch((nint)0x14263483B, [0xEB]);
-
// The game will crash when trying to switch to the FULL_RES path for SSR. It's likley because
// it tries to access shaders that are not available in the game files.
// Ex: MonsterHunterWorld.exe+259329B - lea rcx,[rdi+00000120] # Zero.
// MonsterHunterWorld.exe+228C4A7 - mov rdi,[rdi+00000120] # Attempted read.
- // The code that zero's these addresses looks like a shell of where they would be loaded. My assumption
+ // The code that zeros these addresses looks like a shell of where they would be loaded. My assumption
// is that it's compiled out and that this method of increasing the SSR resolution can't work.
/*
// Attempt to forcefully enable FULL_RES path for SSR.
@@ -1766,7 +1791,7 @@ namespace WorldTuningTool
// SSLR resolution factor 0.5 -> 1.0 (not related to fSSLRFactor or fSSLRScale).
ssrRes1 = new Patch((nint)0x1425926B8 + 0x9, [0x80]);
ssrRes2 = new Patch((nint)0x1425934C0 + 0x8, [0x80]);
- // Skip mip mapping pass (part of _FULL_RES).
+ // Skip mip mapping pass (part of _FULL_RES, not enabled by fullResSSLR).
ssrRes3 = new Patch((nint)0x142282B53, [0x31, 0xC0, 0x90, 0x90, 0x90]);
// Depth mips resolution.
@@ -1808,16 +1833,16 @@ namespace WorldTuningTool
ssrShr7 = new Patch((nint)0x142592EBA + 0x2, [0x3]); // 4 -> 3
ssrShr8 = new Patch((nint)0x142592ED0 + 0x2, [0x3]);
// Mips pass 1 dispatch dimensions.
- ssrSars15 = new Patch((nint)0x142283626 + 0x3, [0x03]); // 4 -> 3
- ssrSars16 = new Patch((nint)0x142283633 + 0x2, [0x03]);
+ ssrSars15 = new Patch((nint)0x142283626 + 0x3, [0x3]); // 4 -> 3
+ ssrSars16 = new Patch((nint)0x142283633 + 0x2, [0x3]);
// Mips pass 2 iRegion parameter.
- ssrSars17 = new Patch((nint)0x142283667 + 0x2, [0x03]);
- ssrSars18 = new Patch((nint)0x14228366A + 0x3, [0x03]);
- ssrSars19 = new Patch((nint)0x14228366E + 0x3, [0x03]);
- ssrSars20 = new Patch((nint)0x142283672 + 0x3, [0x03]);
+ ssrSars17 = new Patch((nint)0x142283667 + 0x2, [0x3]);
+ ssrSars18 = new Patch((nint)0x14228366A + 0x3, [0x3]);
+ ssrSars19 = new Patch((nint)0x14228366E + 0x3, [0x3]);
+ ssrSars20 = new Patch((nint)0x142283672 + 0x3, [0x3]);
// Mips pass 2 dispatch dimensions.
- ssrSars21 = new Patch((nint)0x1422838E7 + 0x3, [0x03]);
- ssrSars22 = new Patch((nint)0x1422838FC + 0x2, [0x03]);
+ ssrSars21 = new Patch((nint)0x1422838E7 + 0x3, [0x3]);
+ ssrSars22 = new Patch((nint)0x1422838FC + 0x2, [0x3]);
// Mips blur dispatch dimensions.
ssrSars23 = new Patch((nint)0x1422839B0, [0x8D, 0x0E, 0x44, 0x8D, 0x76, 0x01, 0x90]);
@@ -1826,6 +1851,9 @@ namespace WorldTuningTool
//new Patch((nint)0x142286877 + 0x2, [0x3]);
forceSSLRTemporalReset = new Patch((nint)0x14228CE53, [0xB9, 0x01, 0x00, 0x00, 0x00, 0x90, 0x90]);
+
+ jmpOverEffects = new Patch((nint)0x14263483B, [0xEB]);
+
}
return new PluginData();
@@ -1911,7 +1939,7 @@ namespace WorldTuningTool
disableReducedRateAnimations = patches.DisableReducedRateAnimations;
if (disableReducedRateAnimations)
{
- zeroFrameSkip.Enable();
+ disableReducedRateAnimationsEnable();
}
viewModeLodOverride = patches.OverrideViewModeLODs;
if (viewModeLodOverride)
@@ -2094,14 +2122,6 @@ namespace WorldTuningTool
param.Update(sMhScene!.Instance);
}
- if (renderPassesObject != 0x0)
- {
- foreach (Parameter param in renderPassesParameters)
- {
- param.Update(renderPassesObject);
- }
- }
-
if (bloomObject != 0x0)
{
foreach (Parameter param in bloomParameters)
@@ -2279,34 +2299,11 @@ namespace WorldTuningTool
{
param.Update(toneMapObject);
}
+ Lut.clearState();
}
return destroyToneMapObject!.Original(toneMapObjectInternal, unknownInt);
}
- private nint CreateRenderPassesObjectHook(nint unknownPtr1, nint unknownPtr2)
- {
- renderPassesObject = createRenderPassesObject!.Original(unknownPtr1, unknownPtr2);
- foreach (Parameter param in renderPassesParameters)
- {
- param.Update(renderPassesObject);
- }
- return renderPassesObject;
- }
-
- private nint DestroyRenderPassesObjectHook(nint renderPassesObjectInternal, int unknownInt)
- {
- Assert(unknownInt == 1);
- if (renderPassesObject == renderPassesObjectInternal)
- {
- renderPassesObject = 0x0;
- foreach (Parameter param in renderPassesParameters)
- {
- param.Update(renderPassesObject);
- }
- }
- return destroyRenderPassesObject!.Original(renderPassesObjectInternal, unknownInt);
- }
-
private nint CreateBloomObjectHook()
{
bloomObject = createBloomObject!.Original();
@@ -2784,7 +2781,7 @@ namespace WorldTuningTool
ImGui.SetCursorPos(cursorPos + new Vector2(boxWidth + 2.0f, 0.0f));
}
- private static void drawStatusBox(bool superseded, bool hasStatus, Vector2 cursorPos, float boxHeight, float boxWidth)
+ private static void drawStatusBox(bool superseded, byte hasStatus, Vector2 cursorPos, float boxHeight, float boxWidth)
{
Vector2 windowPos = ImGui.GetWindowPos();
windowPos += cursorPos - new Vector2(ImGui.GetScrollX(), ImGui.GetScrollY());
@@ -2793,7 +2790,11 @@ namespace WorldTuningTool
{
boxColor = ImGui.GetStyle().Colors[(int)ImGuiCol.Separator];
}
- else if (hasStatus)
+ else if (hasStatus == 1) // Pending.
+ {
+ boxColor = ImGui.GetStyle().Colors[(int)ImGuiCol.FrameBg];
+ }
+ else if (hasStatus == 2) // Modified.
{
boxColor = ImGui.GetStyle().Colors[(int)ImGuiCol.PlotHistogram];
}
@@ -2806,7 +2807,7 @@ namespace WorldTuningTool
drawList.AddRectFilled(windowPos, windowPos + new Vector2(boxWidth, boxHeight), (uint)ColorVectorToInt(boxColor));
}
- private void drawOverrides(Config config, List<Override>? globalOverrides, List<Override>? stageOverrides, float width)
+ private void drawStageOverrides(Config config, List<Override>? globalOverrides, List<Override>? stageOverrides, float width)
{
ImGui.PushItemWidth(width * 0.35f);
if (ImGui.BeginCombo("##Stage", StageToString(selectedStage), ImGuiComboFlags.HeightLarge))
@@ -2928,7 +2929,7 @@ namespace WorldTuningTool
{
(selectedOverrides[i], selectedOverrides[i + 1]) = (selectedOverrides[i + 1], selectedOverrides[i]);
}
- bool hasStatus = ovS.Draw(false, selectedOverrides, stageOverrides, globalOverrides, superseded, width);
+ byte hasStatus = ovS.Draw(false, selectedOverrides, stageOverrides, globalOverrides, superseded, width);
if (!editMode)
{
drawStatusBox(superseded, hasStatus, cursorPos, boxHeight, boxWidth);
@@ -2957,16 +2958,17 @@ namespace WorldTuningTool
if (ImGui.Button("Save"))
{
- for (int i = 0; i < selectedOverrides.Count; i++)
+ for (int i = selectedOverrides.Count - 1; i >= 0; i--)
{
Override ovS = selectedOverrides[i];
if (ovS.Param == null)
{
selectedOverrides.RemoveAt(i);
- i--;
- continue;
}
- ovS.Save();
+ else
+ {
+ ovS.Save();
+ }
}
saveConfig(config);
}
@@ -2985,161 +2987,182 @@ namespace WorldTuningTool
ImGui.Text("(Not Saved)");
ImGui.PopStyleVar();
}
-
- ImGui.Separator();
}
- public void OnImGuiRender()
+ public void drawSetOverrides(Config config, List<Override> globalOverrides, List<Override>? stageOverrides, float width)
{
- float width = ImGui.GetWindowWidth();
- width /= width / (600.0f * ImGui.GetIO().FontGlobalScale);
-
- Config config = getConfig();
-
- List<Override>? stageOverrides = maybeGetStageOverrides(config);
- List<Override>? globalOverrides = null;
-
- bool expand = ImGui.CollapsingHeader("Current Stage:", ImGuiTreeNodeFlags.DefaultOpen);
- ImGui.SameLine();
- ImGui.Text($"{StageToString(currentStage)}");
- if (expand)
+ bool setOrderChanged = false;
+ List<Override> setOverrides = config.Sets[selectedSet];
+ if (!editMode)
{
- drawOverrides(config, globalOverrides, stageOverrides, width);
+ if (ImGui.Button("Edit"))
+ {
+ editMode = true;
+ }
}
-
- // From this point forward, we have to consider both globalOverrides and stageOverrides.
- globalOverrides = config.Overrides[globalStage];
-
- ImGui.PushID("Set");
- ImGui.Text("Quick Sets");
- string prevSet = selectedSet;
- string preRenameSet = setSelection.Draw(width);
- if (prevSet != preRenameSet)
+ else
{
- BeginTransition();
- HandleSetChange(prevSet, globalOverrides, stageOverrides);
- EndTransition();
+ if (ImGui.Button("< Edit"))
+ {
+ editMode = false;
+ }
+ ImGui.SameLine();
+ if (ImGui.Button("Add override"))
+ {
+ Override ov = new Override();
+ ov.Set(); // Empty override never superseded.
+ setOverrides.Add(ov);
+ setOrderChanged = true;
+ }
}
- if (selectedSet != "")
+ for (int i = 0; i < setOverrides.Count; i++)
{
- bool setOrderChanged = false;
- List<Override> setOverrides = config.Sets[selectedSet];
- if (!editMode)
+ ImGui.PushID(i);
+ Override ovP = setOverrides[i];
+ bool superseded = ovP.Param != null && overridesContainsParam(externalOverrides.Values, ovP.Param);
+ bool requestRemove = false, requestUp = false, requestDown = false;
+ Vector2 cursorPos = default;
+ float boxHeight = 0.0f, boxWidth = 0.0f;
+ if (editMode)
{
- if (ImGui.Button("Edit"))
- {
- editMode = true;
- }
+ setOrderChanged |= drawListButtons(ref requestRemove, ref requestUp, ref requestDown);
}
else
{
- if (ImGui.Button("< Edit"))
- {
- editMode = false;
- }
- ImGui.SameLine();
- if (ImGui.Button("Add override"))
- {
- Override ov = new Override();
- ov.Set(); // Empty override never superseded.
- setOverrides.Add(ov);
- setOrderChanged = true;
- }
+ prepareStatusBox(ref cursorPos, ref boxHeight, ref boxWidth);
}
- for (int i = 0; i < setOverrides.Count; i++)
+ if (requestDown && i < setOverrides.Count - 1)
{
- ImGui.PushID(i);
- Override ovP = setOverrides[i];
- bool superseded = ovP.Param != null && overridesContainsParam(externalOverrides.Values, ovP.Param);
- bool requestRemove = false, requestUp = false, requestDown = false;
- Vector2 cursorPos = default;
- float boxHeight = 0.0f, boxWidth = 0.0f;
- if (editMode)
- {
- setOrderChanged |= drawListButtons(ref requestRemove, ref requestUp, ref requestDown);
- }
- else
- {
- prepareStatusBox(ref cursorPos, ref boxHeight, ref boxWidth);
- }
- if (requestDown && i < setOverrides.Count - 1)
- {
- (setOverrides[i], setOverrides[i + 1]) = (setOverrides[i + 1], setOverrides[i]);
- }
- bool hasStatus = ovP.Draw(true, setOverrides, stageOverrides, globalOverrides, superseded, width);
- if (!editMode)
- {
- drawStatusBox(superseded, hasStatus, cursorPos, boxHeight, boxWidth);
- }
- if (requestUp && i > 0)
- {
- (setOverrides[i], setOverrides[i - 1]) = (setOverrides[i - 1], setOverrides[i]);
- }
- if (requestRemove)
+ (setOverrides[i], setOverrides[i + 1]) = (setOverrides[i + 1], setOverrides[i]);
+ }
+ byte hasStatus = ovP.Draw(true, setOverrides, stageOverrides, globalOverrides, superseded, width);
+ if (!editMode)
+ {
+ drawStatusBox(superseded, hasStatus, cursorPos, boxHeight, boxWidth);
+ }
+ if (requestUp && i > 0)
+ {
+ (setOverrides[i], setOverrides[i - 1]) = (setOverrides[i - 1], setOverrides[i]);
+ }
+ if (requestRemove)
+ {
+ if (!superseded)
{
- if (!superseded)
+ BeginTransition();
+ ovP.Unset();
+ if (ovP.Param != null)
{
- BeginTransition();
- ovP.Unset();
- if (ovP.Param != null)
+ if (!(stageOverrides != null && setIfOverridesContainsParam(stageOverrides, ovP.Param)))
{
- if (!(stageOverrides != null && setIfOverridesContainsParam(stageOverrides, ovP.Param)))
- {
- setIfOverridesContainsParam(globalOverrides, ovP.Param);
- }
+ setIfOverridesContainsParam(globalOverrides, ovP.Param);
}
- EndTransition();
}
- setOverrides.RemoveAt(i);
- i--;
+ EndTransition();
}
- ImGui.PopID();
+ setOverrides.RemoveAt(i);
+ i--;
}
- if (ImGui.Button("Save"))
+ ImGui.PopID();
+ }
+ if (ImGui.Button("Save"))
+ {
+ for (int i = setOverrides.Count - 1; i >= 0; i--)
{
- for (int i = 0; i < setOverrides.Count; i++)
+ Override ovP = setOverrides[i];
+ if (ovP.Param == null)
+ {
+ setOverrides.RemoveAt(i);
+ }
+ else
{
- Override ovP = setOverrides[i];
- if (ovP.Param == null)
- {
- setOverrides.RemoveAt(i);
- i--;
- continue;
- }
ovP.Save();
}
- saveConfig(config);
}
- if (setOrderChanged)
+ saveConfig(config);
+ }
+ if (setOrderChanged)
+ {
+ configState |= SetNotSaved;
+ }
+ if ((configState & SetNotSaved) == SetNotSaved)
+ {
+ ImGui.SameLine();
+ ImGui.PushStyleVar(ImGuiStyleVar.Alpha, ImGui.GetStyle().Alpha * fadeAlphaFactor);
+ ImGui.Text("(Not Saved)");
+ ImGui.PopStyleVar();
+ }
+ }
+
+ public void OnImGuiRender()
+ {
+ float width = ImGui.GetWindowWidth();
+ width /= width / (600.0f * ImGui.GetIO().FontGlobalScale);
+
+ Config config = getConfig();
+
+ List<Override>? stageOverrides = maybeGetStageOverrides(config);
+ List<Override>? globalOverrides = null;
+
+ ImGui.PushID("Stage");
+ bool expand = ImGui.CollapsingHeader("Current Stage:", ImGuiTreeNodeFlags.DefaultOpen);
+ ImGui.SameLine();
+ ImGui.Text($"{StageToString(currentStage)}");
+ if (expand)
+ {
+ drawStageOverrides(config, globalOverrides, stageOverrides, width);
+ ImGui.Separator();
+ }
+ ImGui.PopID();
+
+ // From this point forward, we must consider both globalOverrides and stageOverrides.
+ globalOverrides = config.Overrides[globalStage];
+
+ ImGui.PushID("Set");
+ expand = ImGui.CollapsingHeader("Quick Sets", ImGuiTreeNodeFlags.DefaultOpen);
+ if (!expand)
+ {
+ ImGui.SameLine();
+ ImGui.Text($"(Active: {((selectedSet == "") ? "None" : selectedSet)})");
+ }
+ else
+ {
+ string prevSet = selectedSet;
+ string preRenameSet = setSelection.Draw(width);
+ if (prevSet != preRenameSet)
{
- configState |= SetNotSaved;
+ BeginTransition();
+ HandleSetChange(prevSet, globalOverrides, stageOverrides);
+ EndTransition();
}
- if ((configState & SetNotSaved) == SetNotSaved)
+ if (selectedSet != "")
{
- ImGui.SameLine();
- ImGui.PushStyleVar(ImGuiStyleVar.Alpha, ImGui.GetStyle().Alpha * fadeAlphaFactor);
- ImGui.Text("(Not Saved)");
- ImGui.PopStyleVar();
+ drawSetOverrides(config, globalOverrides, stageOverrides, width);
}
+ ImGui.Separator();
}
ImGui.PopID();
- ImGui.Separator();
-
ImGui.PushID("External");
- ImGui.Text("External");
- foreach (Override ovE in externalOverrides.Values)
+ expand = ImGui.CollapsingHeader("External", ImGuiTreeNodeFlags.DefaultOpen);
+ if (!expand)
{
- Vector2 cursorPos = default;
- float boxHeight = 0.0f, boxWidth = 0.0f;
- prepareStatusBox(ref cursorPos, ref boxHeight, ref boxWidth);
- bool hasStatus = ovE.Draw(false, null, null, null, false, width);
- drawStatusBox(false, hasStatus, cursorPos, boxHeight, boxWidth);
+ ImGui.SameLine();
+ ImGui.Text($"(Count: {externalOverrides.Count})");
+ }
+ else
+ {
+ foreach (Override ovE in externalOverrides.Values)
+ {
+ Vector2 cursorPos = default;
+ float boxHeight = 0.0f, boxWidth = 0.0f;
+ prepareStatusBox(ref cursorPos, ref boxHeight, ref boxWidth);
+ byte hasStatus = ovE.Draw(false, null, null, null, false, width);
+ drawStatusBox(false, hasStatus, cursorPos, boxHeight, boxWidth);
+ }
+ ImGui.Separator();
}
ImGui.PopID();
- ImGui.Separator();
-
if (ImGui.CollapsingHeader("Patches"))
{
PatchConfig patches = config.Patches;
@@ -3155,7 +3178,7 @@ namespace WorldTuningTool
}
if (ImGui.BeginItemTooltip())
{
- ImGui.Text("Very complex patch, please report any issues you notice.\nThis also appears to scale SSLR Eliminate Depth, it's suggested to half it's value when this is enabled.");
+ ImGui.Text("Very complex patch, please report any issues you notice.\nThis also scales some SSLR parameters. Suggested change:\n SSLR Eliminate Depth: 10 -> 5\nSSLR Dither Radius: 3 -> 1.5");
ImGui.EndTooltip();
}
@@ -3191,14 +3214,14 @@ namespace WorldTuningTool
}
if (ImGui.BeginItemTooltip())
{
- ImGui.Text("Tone Map Type: 7 = Uchimura.");
+ ImGui.Text("Add Uchimura as Tone Map Type 7.");
ImGui.EndTooltip();
}
#endif
ImGui.Text("General");
ImGui.Separator();
- if (ImGui.Checkbox("Volume Rendering Full Resolution Blur Pass (Requires Area Change)", ref fullResVolumeBlur))
+ if (ImGui.Checkbox("Volume Rendering Full Resolution Blur Pass", ref fullResVolumeBlur))
{
if (fullResVolumeBlur)
{
@@ -3208,13 +3231,14 @@ namespace WorldTuningTool
{
fullResVolumeBlurDisable();
}
+ resetRenderer();
patches.FullResolutionVolumeBlur = fullResVolumeBlur;
config.Patches = patches;
saveConfig(config);
}
if (ImGui.BeginItemTooltip())
{
- ImGui.Text("This can get rid of excessive aliasing when something is in front of a volumetric effect.\nMove to a different area for this to apply. It will stay applied after that.");
+ ImGui.Text("This can get rid of excessive aliasing when something is in front of a volumetric effect.");
ImGui.EndTooltip();
}
@@ -3302,11 +3326,11 @@ namespace WorldTuningTool
{
if (disableReducedRateAnimations)
{
- zeroFrameSkip.Enable();
+ disableReducedRateAnimationsEnable();
}
else
{
- zeroFrameSkip.Disable();
+ disableReducedRateAnimationsDisable();
}
patches.DisableReducedRateAnimations = disableReducedRateAnimations;
config.Patches = patches;
@@ -3345,7 +3369,7 @@ namespace WorldTuningTool
{
if (ImGui.CollapsingHeader("Lights"))
{
- Lights.drawUI(width);
+ Lights.drawLights(width);
}
}
@@ -3362,12 +3386,12 @@ namespace WorldTuningTool
ImGui.PushID("Screen");
if (ImGui.CollapsingHeader("Screen"))
{
- ImGui.Text($"Address: 0x{sMhRender!.Instance:X}");
+ ImGui.Text($"sMhRender: 0x{sMhRender!.Instance:X}");
foreach (Parameter param in screenRenderParameters)
{
param.Draw(width);
}
- ImGui.Text($"Address: 0x{sMhGUI!.Instance:X}");
+ ImGui.Text($"sMhGUI: 0x{sMhGUI!.Instance:X}");
foreach (Parameter param in screenGuiParameters)
{
param.Draw(width);
@@ -3378,12 +3402,12 @@ namespace WorldTuningTool
ImGui.PushID("Time");
if (ImGui.CollapsingHeader("Time and Weather"))
{
- ImGui.Text($"Address: 0x{sTime!.Instance:X}");
+ ImGui.Text($"sTime: 0x{sTime!.Instance:X}");
foreach (Parameter param in sTimeParameters)
{
param.Draw(width);
}
- ImGui.Text($"Address: 0x{sQuest!.Instance:X}");
+ ImGui.Text($"sQuest: 0x{sQuest!.Instance:X}");
ImGui.Checkbox("##Set Weather Mode", ref setWeatherMode);
ImGui.SameLine();
ImGui.SetNextItemWidth(width * defaultParamWidth);
@@ -3405,7 +3429,7 @@ namespace WorldTuningTool
}
if (expand)
{
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in lodParameters)
{
param.Draw(width);
@@ -3420,7 +3444,7 @@ namespace WorldTuningTool
ImGui.PushID("Passthrough");
if (ImGui.CollapsingHeader("Passthrough"))
{
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in passthroughParameters)
{
param.Draw(width);
@@ -3433,7 +3457,7 @@ namespace WorldTuningTool
{
shadowResParameter.Draw(width);
ImGui.Separator();
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in shadowCascadeParameters)
{
param.Draw(width);
@@ -3457,17 +3481,20 @@ namespace WorldTuningTool
expand = ImGui.CollapsingHeader("Primary Light");
if (ImGui.BeginItemTooltip())
{
- ImGui.Text("These are the per-frame parameters of the Primary uMhInfiniteLight, which can also be found under Lights -> Scene Lights -> Infinite");
+ ImGui.Text("Per-frame parameters for the \"Primary\" uMhInfiniteLight, which can also be found under Lights -> Scene Lights -> Infinite.");
ImGui.EndTooltip();
}
if (expand)
{
// MonsterHunterWorld.exe+1AB99E0 - mov rax,[MonsterHunterWorld.exe+500E180]
nint primaryLightObject = Get<nint>(Get<nint>(0x14500E180), 0x4B0);
- ImGui.Text($"Address: 0x{primaryLightObject:X}");
- foreach (Parameter param in primaryLightParameters)
+ ImGui.Text($"uMhInfiniteLight: 0x{primaryLightObject:X}");
+ if (primaryLightObject != 0x0)
{
- param.Draw(width);
+ foreach (Parameter param in primaryLightParameters)
+ {
+ param.Draw(width);
+ }
}
}
ImGui.PopID();
@@ -3475,7 +3502,7 @@ namespace WorldTuningTool
ImGui.PushID("LightProbes");
if (ImGui.CollapsingHeader("Light Probes"))
{
- ImGui.Text($"Address: 0x{sLightProbes!.Instance:X}");
+ ImGui.Text($"sLightProbes: 0x{sLightProbes!.Instance:X}");
foreach (Parameter param in sLightProbesParameters)
{
param.Draw(width);
@@ -3486,7 +3513,7 @@ namespace WorldTuningTool
ImGui.PushID("ContactLight");
if (ImGui.CollapsingHeader("Contact Light"))
{
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in contactShadowParameters)
{
param.Draw(width);
@@ -3507,7 +3534,7 @@ namespace WorldTuningTool
}
if (expand)
{
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in ssaoParameters)
{
param.Draw(width);
@@ -3518,7 +3545,7 @@ namespace WorldTuningTool
ImGui.PushID("VolumeRenderer");
if (ImGui.CollapsingHeader("Volume Renderer"))
{
- ImGui.Text($"Address: 0x{sVolumeRenderer!.Instance:X}");
+ ImGui.Text($"sVolumeRenderer: 0x{sVolumeRenderer!.Instance:X}");
foreach (Parameter param in sVolumeRendererParameters)
{
param.Draw(width);
@@ -3529,7 +3556,7 @@ namespace WorldTuningTool
ImGui.PushID("Lighting");
if (ImGui.CollapsingHeader("Lighting"))
{
- ImGui.Text($"Address: 0x{toneMapObject:X}");
+ ImGui.Text($"uToneMapFilter: 0x{toneMapObject:X}");
if (toneMapObject != 0x0)
{
if (ImGui.CollapsingHeader("LUTs"))
@@ -3539,12 +3566,12 @@ namespace WorldTuningTool
nint lutMap0 = Get<nint>(toneMapObject, 0x1A8);
if (lutMap0 != 0x0)
{
- WorldLUTs.drawUI(lutMap0, toneMapObject, 0, width);
+ Lut.drawLut(lutMap0, toneMapObject, 0, width);
}
nint lutMap1 = Get<nint>(toneMapObject, 0x1B0);
if (lutMap1 != 0x0)
{
- WorldLUTs.drawUI(lutMap1, toneMapObject, 1, width);
+ Lut.drawLut(lutMap1, toneMapObject, 1, width);
}
}
foreach (Parameter param in toneMapParameters)
@@ -3553,13 +3580,13 @@ namespace WorldTuningTool
}
}
ImGui.Separator();
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in exposureParameters)
{
param.Draw(width);
}
ImGui.Separator();
- ImGui.Text($"Address: 0x{sMhRender!.Instance:X}");
+ ImGui.Text($"sMhRender: 0x{sMhRender!.Instance:X}");
foreach (Parameter param in brightnessParameters)
{
param.Draw(width);
@@ -3576,7 +3603,7 @@ namespace WorldTuningTool
}
if (expand)
{
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in sslrParameters)
{
param.Draw(width);
@@ -3594,7 +3621,7 @@ namespace WorldTuningTool
}
if (expand)
{
- ImGui.Text($"Address: 0x{sMhScene!.Instance:X}");
+ ImGui.Text($"sMhScene: 0x{sMhScene!.Instance:X}");
foreach (Parameter param in sssParameters)
{
param.Draw(width);
@@ -3602,26 +3629,10 @@ namespace WorldTuningTool
}
ImGui.PopID();
- /*
- ImGui.PushID("Render Passes");
- if (ImGui.CollapsingHeader("Render Passes"))
- {
- ImGui.Text($"Address: 0x{renderPassesObject:X}");
- if (renderPassesObject != 0x0)
- {
- foreach (Parameter param in renderPassesParameters)
- {
- param.Draw(width);
- }
- }
- }
- ImGui.PopID();
- */
-
ImGui.PushID("Bloom");
if (ImGui.CollapsingHeader("Bloom"))
{
- ImGui.Text($"Address: 0x{bloomObject:X}");
+ ImGui.Text($"uBloomFilter: 0x{bloomObject:X}");
if (bloomObject != 0x0)
{
foreach (Parameter param in bloomParameters)
@@ -3635,7 +3646,7 @@ namespace WorldTuningTool
ImGui.PushID("DepthOfField");
if (ImGui.CollapsingHeader("Depth of Field"))
{
- ImGui.Text($"Address: 0x{dofObject:X}");
+ ImGui.Text($"uNewDOFFilter: 0x{dofObject:X}");
if (dofObject != 0x0)
{
foreach (Parameter param in dofParameters)
@@ -3649,7 +3660,7 @@ namespace WorldTuningTool
ImGui.PushID("MotionBlur");
if (ImGui.CollapsingHeader("Motion Blur"))
{
- ImGui.Text($"Address: 0x{motionBlurObject:X}");
+ ImGui.Text($"uMotionBlurReconstructionFilter: 0x{motionBlurObject:X}");
if (motionBlurObject != 0x0)
{
foreach (Parameter param in motionBlurParameters)
@@ -3663,7 +3674,7 @@ namespace WorldTuningTool
ImGui.PushID("Haze");
if (ImGui.CollapsingHeader("Haze"))
{
- ImGui.Text($"Address: 0x{hazeObject:X}");
+ ImGui.Text($"uHazeFilter: 0x{hazeObject:X}");
if (hazeObject != 0x0)
{
foreach (Parameter param in hazeParameters)
@@ -3677,7 +3688,7 @@ namespace WorldTuningTool
ImGui.PushID("Sky");
if (ImGui.CollapsingHeader("Sky"))
{
- ImGui.Text($"Address: 0x{simpleSkyObject:X}");
+ ImGui.Text($"uMhSky2Simple: 0x{simpleSkyObject:X}");
if (simpleSkyObject != 0x0)
{
foreach (Parameter param in simpleSkyParameters)
@@ -3691,7 +3702,7 @@ namespace WorldTuningTool
ImGui.PushID("Fog");
if (ImGui.CollapsingHeader("Fog"))
{
- ImGui.Text($"Address: 0x{fogObject:X}");
+ ImGui.Text($"uMhDistanceFog: 0x{fogObject:X}");
if (fogObject != 0x0)
{
foreach (Parameter param in fogParameters)
@@ -3705,7 +3716,7 @@ namespace WorldTuningTool
ImGui.PushID("SpeedTree");
if (ImGui.CollapsingHeader("SpeedTree"))
{
- ImGui.Text($"Address: 0x{sMhSpeedTree!.Instance:X}");
+ ImGui.Text($"sMhSpeedTree: 0x{sMhSpeedTree!.Instance:X}");
foreach (Parameter param in speedTreeParameters)
{
param.Draw(width);
@@ -3716,7 +3727,7 @@ namespace WorldTuningTool
ImGui.PushID("WaterWave");
if (ImGui.CollapsingHeader("Water Waves"))
{
- ImGui.Text($"Address: 0x{waterWaveObject:X}");
+ ImGui.Text($"uWaterWave: 0x{waterWaveObject:X}");
if (waterWaveObject != 0x0)
{
foreach (Parameter param in waterWaveParameters)
@@ -3736,7 +3747,7 @@ namespace WorldTuningTool
}
if (expand)
{
- ImGui.Text($"Address: 0x{fxaaObject:X}");
+ ImGui.Text($"uFXAAFilter: 0x{fxaaObject:X}");
if (fxaaObject != 0x0)
{
foreach (Parameter param in fxaaParameters)
@@ -3756,7 +3767,7 @@ namespace WorldTuningTool
}
if (expand)
{
- ImGui.Text($"Address: 0x{taaObject:X}");
+ ImGui.Text($"uTemporalAAFilter2: 0x{taaObject:X}");
if (taaObject != 0x0)
{
foreach (Parameter param in taaParameters)
@@ -3827,25 +3838,6 @@ namespace WorldTuningTool
ImGui.EndTooltip();
}
- if (ImGui.Checkbox("Disable Reduced Rate Animations 2", ref disableReducedRateAnimations2))
- {
- if (disableReducedRateAnimations2)
- {
- zeroFrameSkip2.Enable();
- zeroFrameSkip3.Enable();
- }
- else
- {
- zeroFrameSkip2.Disable();
- zeroFrameSkip3.Disable();
- }
- }
- if (ImGui.BeginItemTooltip())
- {
- ImGui.Text("Unlikely to do anything. If you find an instance were a frame skip is set here, please report.\nThis may be included by the first patch in the future.");
- ImGui.EndTooltip();
- }
-
ImGui.Separator();
}