Lyall / SMTVFix

A fix for ultrawide/narrower displays in Shin Megami Tensei V: Vengeance.
MIT License
76 stars 1 forks source link

Read-only CVARs #57

Open WaffleWasher opened 3 days ago

WaffleWasher commented 3 days ago

Hey Lyall,

I've been using your fix and pairing it with the engine.ini. Noticed CSMbias doesn't flag when using the command with your SMTVfix cvar, but paired with your injection, and Engine.ini a lot of cvars unlocked.

I was specifically wondering if the ways to override CSM draw distance and shadow culling. I'd prefer to have shadows not cull on screen at all, and currently they seem to cull at the edges of the screen (when in aerial view), and in the center of the screen in 3rd person view. For example of 3rd person, when standing still and looking at a CSM cast directly, it may be faded, but if panning the camera to where the CSM cast is at the edge of the camera, the object casts? This issue is present in Visions of Mana, too (VoM also has a clamp on GTAO to where GPU usage on a 4090 remains at ~60% at 45fps, but SSAO maxed gives 80fps 100% usage). I can get shadows to draw far in VoM, but if I just look at said shadow dead-on, it culls. I mention VoM, as that too is 4.27 and uses Denuvo. I can provide further information. I'm currently trying to learn blueprint mods for this, but I was wondering if you knew of any other options. I also want to tweak around with both games to see if NPC draw distance can be increased in a way, as you were able to increase it for the SMTVfix, at least it appears this way.

Sorry to throw a lot at you, but you made progress with SMTV, which helped me make that game 4090 appropriate, I'm just trying to get some of these UE4 games "maxed" out for psychos like me lol. I'll put the cvars I use below, still testing, so there are redundancies like shadow resolution. Thanks for your work, been a fan since Octopath.

Engine.ini: [SystemSettings] r.LandscapeLODBias=-0.9 r.SkeletalMeshLODBias=-15 r.MaterialQualityLevel=3 r.MipMapLodBias=-15 r.StaticMeshLODDistanceScale=0.01 r.ReflectionEnvironment=1 r.ReflectionCaptureResolution=1024 r.MaxQualityMode=1 r.HighQualityLightMaps=1 r.SceneColorFringeQuality=0 r.NormalMapsForStaticLighting=1 r.SubsurfaceScattering=1 r.AllowPointLightCubemapShadows=1 r.Shadow.DistanceScale=10 r.SSS.Scale=1 r.SSS.SampleSet=2 r.SSS.Filter=1 r.SSS.Checkerboard=0 r.maxanisotropy=16 r.Tonemapper.Quality=1 r.DFShadowQuality=3 r.ParticleLightQuality=2 r.GenerateMeshDistanceFields=1 r.DistanceFieldGI=1 r.ParticleLODBias=-3 r.Shadow.CSM.MaxCascades=16384 r.Shadow.CSMDepthBias=4 ;0.1 r.Shadow.TexelsPerPixel=16384 r.HairStrands.DeepShadow.SuperSampling=1 r.HairStrands.DeepShadow.Resolution=16384 r.HairStrands.DeepShadow.KernelType=2 r.Shadow.MaxNumFarShadowCascades=16384 r.Shadow.TransitionScale=1 r.shadow.csm.transitionscale=1 r.ContactShadows=1 r.LightFunctionQuality=3 r.AOHeightfieldOcclusion=1 r.DistanceFieldAO=1 r.AOUpdateGlobalDistanceField=1 r.AOUseJitter=1 r.CapsuleShadows=1 r.Downsample.Quality=3 r.SSR.Quality=4 r.SSR.HalfResSceneColor=0 r.RefractionQuality=2 r.RefractionQuality=3 r.HeightfieldGlobalIllumination=1 r.Shadow.EnableModulatedSelfShadow=1 r.LightShaftAllowTAA=1 r.DistanceFields=1 r.SkyLight.RealTimeReflectionCapture=1 r.ssgi.quality=4 r.SSGI.enable=1 r.ssgi.halfres=0 r.VolumetricFog.TemporalReprojection=1 r.AOApplyToStaticIndirect=1 r.VolumetricCloud.SkyAO=1 r.DistanceFieldShadowing=1 r.SkyAtmosphere.MultiScatteringLUT.HighQuality=1 r.SupportStationarySkylight=1 r.SkyAtmosphere.LUT32=1 r.DFFullResolution=1 r.Shadow.MinResolution=16384 r.Shadow.MaxResolution=16384 r.Shadow.MinPreShadowResolution=16384 r.SSR.Stencil=0 r.VolumetricCloud=1 r.VolumetricFog=1 r.SkyAtmosphere=1 r.Shadow.RadiusThreshold=0.000001 ; r.Shadow.RadiusThresholdRSM=0.000001 r.Shadow.CSMReceiverBias=0.00001 r.viewdistancescale=10000 r.Shadow.PreShadowFadeResolution=16384 r.DynamicRes.OperationMode=0 r.lightmaxdrawdistancescale=10 r.ShadowQuality=5 r.Shadow.CSMDepthBoundsTest=1 r.MaxCSMRadiusToAllowPerObjectShadows=100 r.DistanceFadeMaxTravel=0 r.PathTracing.LightGridMaxCount=4096 r.PathTracing.LightGridResolution=4096 r.PathTracing.MaxBounces=4096 r.PathTracing.MaxSSSBounces=4096 r.PathTracing.SamplesPerPixel==4096 r.ViewDistanceScale.ApplySecondaryScale=1 r.GTAO.NumAngles=16 r.GTAO.FilterWidth=4 r.GTAO.Downsample=0 r.GTAO.Combined=1 r.EmitterSpawnRateScale=2 r.DistanceFieldShadowing.ForceDFLighting=1 r.ViewDistanceScale.SecondaryScale=1000 r.AllowSimpleLights=1 sg.ViewDistanceQuality=4 sg.TextureQuality=5 sg.EffectsQuality=5 sg.FoliageQuality=5 sg.ShadingQuality=5 sg.ShadowQuality=5 r.Shadow.CSM.MaxMobileCascades=16384 r.TranslucentLightingVolume=1 r.TranslucencyLightingVolumeDim=64 r.AllowStaticLighting=0 r.GTAO.Upsample=1 r.Shadow.MaxCSMResolution=16384 r.ClearCoatNormal=1 r.SSR.HalfResReflections=0 grass.DisableDynamicShadows=0 r.Shadow.FarShadowDistanceOverride=1

Lyall commented 2 days ago

Some of your settings there are a bit ridiculous. Setting some of these cvars too high can break things. Does the game even render shadows properly with the resolution at 16K? You're best off setting cvars one by one and seeing by eye if they are making a noticeable difference to you instead of just maxing out every option.

For shadows, I can't say that I notice any obvious culling towards the screen edge. Do they occur with vanilla settings? Personally for me I use

r.Shadow.MaxResolution=8192
r.Shadow.MaxCSMResolution=8192
r.Shadow.DistanceScale=2
r.Shadow.CSM.TransitionScale=2

This seems to provide the best quality and draw distance that can be accomplished with cascaded shadow maps.

WaffleWasher commented 2 days ago

Some of your settings there are a bit ridiculous. Setting some of these cvars too high can break things. Does the game even render shadows properly with the resolution at 16K? You're best off setting cvars one by one and seeing by eye if they are making a noticeable difference to you instead of just maxing out every option.

For shadows, I can't say that I notice any obvious culling towards the screen edge. Do they occur with vanilla settings? Personally for me I use

r.Shadow.MaxResolution=8192
r.Shadow.MaxCSMResolution=8192
r.Shadow.DistanceScale=2
r.Shadow.CSM.TransitionScale=2

This seems to provide the best quality and draw distance that can be accomplished with cascaded shadow maps.

Since your fix seems to override a lot of my bad settings, it keeps them in line. Without your injection and just UUU, the insanity revealed itself, lol. Honestly I've just increased reflections mesh and shadow draw paired with yours, and I THINK the hairstrands tweak helped. I have been doing these tweaks by launching and closing, since I can't get the in-game console to load (despite UUU insisting it is available). Right now I'm reading through a cvardump of just vanilla to glean any info on base parameters and possibly which commands are unrecognized/read-only. Thanks for the response man.

This is as best as I was able to get it. Edit: Also I'm betting the increased FOV is going outside of the cull range, as vanilla 16:9 keeps its low res casts. Also bigbrain moment and just realized I missed your comment about the input for console. Lovely.

20240915035358_1

WaffleWasher commented 1 day ago

So I've been testing and researching with UUU. I've found a sweetspot to get shadows and drawdistance to play nice, and I think I found a way to remove a lot of the clamps. A cap of 60 is basically required for the settings right now, still gotta optimize it. I put up the gbuffer to get more interaction with materials. It's a drastic change to the lighting and shadows. I turned up mips for more interaction with lights and shadows, and put TAA Gen5 on to mask shimmers, and of course TAA is acting up and ghosting heavily. Turning down the mips doesn't seem to affect it either. I was wondering how you tweaked your TAA?

-1 mips 20240917195051_1

-15 mips 20240917204238_1

Decided to stick with -1, but using the zpass for materials seemed to have helped: 20240917223623_1