Skip to content

Commit

Permalink
CutsceneSquareOffset: allows square skit panels to have Upscale pas…
Browse files Browse the repository at this point in the history
…s applied
  • Loading branch information
emoose committed Oct 2, 2021
1 parent b73c7ea commit ae2d3f0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Arise-SDK.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ OverrideStageSharpenFilterStrength = -1
MinStageEdgeBaseDistance = 12000

; CutsceneRenderFix - scales up UTextureRenderTarget2D to match your screen resolution
; should help improve skit/cutscene resolution, but might apply to other things too if they use UTextureRenderTarget2D...
; if you notice any weirdness please let me know!
; should help improve skit/cutscene resolution, but if you still notice any weirdness please let me know!
; (can be controlled ingame via sdk.CutsceneRenderFix cvar)
CutsceneRenderFix = true

Expand All @@ -42,6 +41,13 @@ CutsceneRenderFix = true
; (sdk default = 100, can be controlled ingame via sdk.CutsceneScreenPercentage cvar)
CutsceneScreenPercentage = 100

; CutsceneSquareOffset - applies a 1-pixel offset to one axis of square skit panels, which seems to allow UE4 Upscale pass to be applied to them
; technically this breaks the aspect-ratio of the panel, which in the past has caused issues with the camera position of the panel
; hopefully just having 1 pixel difference won't have that issue though, but if it does you can disable the offset here
; (note that this is best used with r.Upscale.Quality=5, which seems to help soften up some of the aliasing in these panels)
; (can be controlled ingame via sdk.CutsceneSquareOffset cvar)
CutsceneSquareOffset = true

; OverrideTAAJitterScale - how much jitter to apply to edges used by TAA
; game default has this disabled (scale = 0), not sure if this can actually be beneficial or not
; (can be controlled ingame via sdk.TAAJitterScale cvar)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See https://www.nexusmods.com/talesofarise/mods/5 for the current feature list!
- Improve skit cutscene scaling even more - current method with `sdk.CutsceneScreenPercentage` works differently to UE4's `r.ScreenPercentage` - might be better if this could override `r.ScreenPercentage` during cutscenes instead. (ditto with battles too)
- Landscape/grass LODs, the UE4 cvars don't help that much, probably something in the Landscape system that needs to be changed (some UE4 tutorials for handling things like fading different quality textures in/out seem to rely on blueprints for it, possible they used blueprints for that here too, not sure if those can be edited that easily though)
- Character self-shadows - I think hair uses a seperate shader to other self-shadows, doesn't seem there's any settings for improving this, might need to find the shader responsible somehow...
- TAA improvements - still a lot of aliasing even with TAA&SMAA enabled, not sure if this can be improved at all... there are still some parts of the game code that only check for `AAM_TemporalAA`, and don't have checks for the custom `AAM_HybirdAA` used by the game, maybe fixing those could give some improvements.
- TAA improvements - still a lot of aliasing even with TAA&SMAA enabled, not sure if this can be improved at all... there are still some parts of the game code that only check for `AAM_TemporalAA`, and don't have checks for the custom `AAM_HybirdAA`(sic) used by the game, maybe fixing those could give some improvements.

# UnrealFinderTool changes
Two small changes were needed for UFT to work properly with Arise:
Expand Down
8 changes: 8 additions & 0 deletions src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct
int32_t ForcedLODLevel = -1;
bool CutsceneRenderFix = false;
float CutsceneScreenPercentage = 100;
bool CutsceneSquareOffset = false;
float OverrideTemporalAAJitterScale = -1;
float OverrideTemporalAASharpness = -1;
bool UseUE4TAA = false;
Expand All @@ -78,6 +79,7 @@ bool TryLoadINIOptions(const WCHAR* IniFilePath)
Options.MinStageEdgeBaseDistance = INI_GetFloat(IniPath, L"Graphics", L"MinStageEdgeBaseDistance", Options.MinStageEdgeBaseDistance);
Options.CutsceneRenderFix = INI_GetBool(IniPath, L"Graphics", L"CutsceneRenderFix", Options.CutsceneRenderFix);
Options.CutsceneScreenPercentage = INI_GetFloat(IniPath, L"Graphics", L"CutsceneScreenPercentage", Options.CutsceneScreenPercentage);
Options.CutsceneSquareOffset = INI_GetBool(IniPath, L"Graphics", L"CutsceneSquareOffset", Options.CutsceneSquareOffset);
Options.OverrideTemporalAAJitterScale = INI_GetFloat(IniPath, L"Graphics", L"OverrideTAAJitterScale", Options.OverrideTemporalAAJitterScale);
Options.OverrideTemporalAASharpness = INI_GetFloat(IniPath, L"Graphics", L"OverrideTAASharpness", Options.OverrideTemporalAASharpness);
Options.UseUE4TAA = INI_GetBool(IniPath, L"Graphics", L"UseUE4TAA", Options.UseUE4TAA);
Expand Down Expand Up @@ -233,6 +235,7 @@ void CVarSystemResolution_ctor_Hook()

CVarPointers.push_back(consoleManager->RegisterConsoleVariableRef(L"sdk.CutsceneRenderFix", Options.CutsceneRenderFix, L"Enable/disable skit cutscene resolution scaling", 0));
CVarPointers.push_back(consoleManager->RegisterConsoleVariableRef(L"sdk.CutsceneScreenPercentage", Options.CutsceneScreenPercentage, L"ScreenPercentage to apply to skit cutscenes", 0));
CVarPointers.push_back(consoleManager->RegisterConsoleVariableRef(L"sdk.CutsceneSquareOffset", Options.CutsceneSquareOffset, L"CutsceneSquareOffset", 0));

CVarPointers.push_back(consoleManager->RegisterConsoleVariableRef(L"sdk.TAAJitterScale", Options.OverrideTemporalAAJitterScale, L"Adjust jittering applied to the games TAA (game default has this set to 0, doesn't really seem to work that well, was probably disabled for a reason...)", 0));
CVarPointers.push_back(consoleManager->RegisterConsoleVariableRef(L"sdk.TAASharpness", Options.OverrideTemporalAASharpness, L"Adjust sharpening effect applied to TAA", 0));
Expand Down Expand Up @@ -342,6 +345,11 @@ void CreateRenderTarget2D_Hook(UTextureRenderTarget2D* thisptr)

thisptr->SizeX = int(ceil(NewWidth));
thisptr->SizeY = int(ceil(NewHeight));
if (thisptr->SizeX == thisptr->SizeY && Options.CutsceneSquareOffset)
{
// Hack to force square-resolution boxes to have Upscale pass applied
thisptr->SizeX++;
}
}
}

Expand Down

0 comments on commit ae2d3f0

Please sign in to comment.