diff options
| author | 2026-10-29 23:01:05 -0400 | |
|---|---|---|
| committer | 2026-10-29 23:01:05 -0400 | |
| commit | b1dfe847f742aa7079a819090ba36d606e7af4db (patch) | |
| tree | fa5d1f7a02f7b29f28ef54d051c34ffa10b9cc7b /Plugin.cs | |
| parent | 504e6e7ab767894b5f9f9276dfe9361979d5bcf2 (diff) | |
| download | WorldTuningTool-b1dfe847f742aa7079a819090ba36d606e7af4db.tar.gz WorldTuningTool-b1dfe847f742aa7079a819090ba36d606e7af4db.tar.bz2 WorldTuningTool-b1dfe847f742aa7079a819090ba36d606e7af4db.zip | |
LUT tweaks
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'Plugin.cs')
| -rw-r--r-- | Plugin.cs | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -613,7 +613,6 @@ namespace WorldTuningTool } // Start of Parameter Definitions. - private delegate void OnAreaChange(nint sMhArea); private Hook<OnAreaChange>? onAreaChange; @@ -931,10 +930,11 @@ namespace WorldTuningTool private Hook<DestroyBloomObject>? destroyBloomObject; private nint bloomObject = 0x0; private static Parameter[] bloomParameters = { - // Disabling 'Draw' is a bad way to disable bloom. It breaks the filter on initial load which - // can be seen when returning to title or opening a guild card for the first time. Setting 'Bloom Renormalize' - // to 0.0 or 'Bloom Reduction Resolution' to -1 can both effectively disable bloom without that issue. - //newFlag<byte>("Bloom Enabled", 0x14, ParameterType.FLAG, (1 << 1)), // Draw + // Disabling "Draw" is a bad way to disable bloom as it breaks the filter on initialization. + // It can be seen when returning to title or opening a guild card for the first time. + // Setting "Bloom Renormalize" to 0.0 or "Bloom Reduction Resolution" to -1 can both + // effectively disable bloom without that issue. + //M<byte>("Bloom Enabled", 0x14, ParameterType.FLAG, (1 << 1)), // Draw P<float>("Bloom Threshold", 0x204, ParameterType.FLOAT, pStep(0.001f)), P<float>("Bloom Renormalize", 0x208, ParameterType.FLOAT, pMin(0.0f)), P<int>("Bloom Color", 0x200, ParameterType.COLOR), @@ -2283,6 +2283,9 @@ namespace WorldTuningTool sslrEnvMapIntensity.Update(sMhScene!.Instance, true); } + // Any CreateObject() can be called many times consecutively before it's associated DestroyObject(). + // For this to be correct, the most recent CreateObject() needs to be the object that is used. + // This is why we cannot, for example, Assert(toneMapObject == 0x0) in CreateToneMapObjectHook(). private nint CreateToneMapObjectHook() { toneMapObject = createToneMapObject!.Original(); @@ -2290,6 +2293,7 @@ namespace WorldTuningTool { param.Update(toneMapObject); } + Lut.clearState(); return toneMapObject; } @@ -2303,7 +2307,6 @@ namespace WorldTuningTool { param.Update(toneMapObject); } - Lut.clearState(); } return destroyToneMapObject!.Original(toneMapObjectInternal, unknownInt); } |