The Witcher 3
0 of 0

File information

Last updated

Original upload

Created by

R4zen_Hose_Tony

Uploaded by

R4zenTonyHose

Virus scan

Safe to use

About this mod

When RT is On and ur GPU VRAM reach over 95% usage at playtrought or even after few loading/fast travel, then soon after memory leak issue is triggered, you can observe it by ur GPU BUS usage will grove 2-3 times higher, this behavior causes massive FPS drop with stuttering. This mod can fix that on any GPU.

Permissions and credits
Changelogs

This memory leak is triggered when you are using RT GI and ur GPU VRAM reach over 95% usage at playtrought or even after few loading/fast travel, then soon after memory leak issue is triggered, you can observe it by ur GPU PCI-E BUS usage (you can check this e.g. in GPU-Z in sensors tab) will grove 2-3 times higher, this behavior causes massive FPS drop with stuttering all the time until you restart game or exit to menu.

This fix is mostly for GPU with lower VRAM size then 20GB for 4K resolution or <16GB for 1440p and <12GB for 1080p.


How to install:

1) Unpack "0_TW3_Memory_Leak_FIX.zip"  and Copy this ini file:

0_TW3_Memory_Leak_FIX.ini

2) to the following folder
: [The Witcher 3 Wild Hunt]\bin\config\platform\pc

*
sometimes, probably at first run after applied mod ini, game may automaticly change ur Textures settings to "Low" but it won't be working like low, only on quality you had before, but after changing them back to High or  what you had it will stay at it.

To uninstall just delete this ini file.

Memory leak fix ini file settings include:

[Rendering]
EnableCustomMipBias=true (this settings enabling in game engine ForceCustomMipBias to be working and changing)
TextureMipBias=-0.2 ( this settings don't work when EnableCustomMipBias= is true, but to be calm i have set it to -0,2)
TextureInFlightBudget=256 ( I am also unsure why CDPR set TextureInFlightBudget to a value of 500 for all texture settings, even for Low, while in version 1.32, even Ultra had a value of 128. Therefore, I set it to 256 and noticed a slight improvement in VRAM usage.)
ForceCustomMipBias=-0.5 <- lower number = better texture quality but higher VRAM usage, you can lower this value, it will increasingly increases VRAM usage. For RTX 3070/3080 maybe ForceCustomMipBias value around =-1.0 will be ok or even lower, but you have to test by urself to find "sweet spot". (max is -2.0 but this almost disable this fix in use, if you want higher then better change textures to Ultra with = value around -1.0 max)


Cons and pros of this memory leak fix:

- lower textures quality and sharpness

+ lower VRAM usage, No more memory leak issue causing massive FPS drop and stuttering.


*I know this is not perfect solution, but for me playing with RT, even with this fix is far more better visual experiencess, then wichout RT at all ultra+ settings. And for my RTX 3060 6GB VRAM mobile GPU this is only avaiable solution to do that and also for others with even much  faster GPUs (e.g. even on  RTX 4070 Ti or 4080, but it's depends of your resolution)



Tips and Tweaks:

1) How to improve sharpness:

For Nvidia GPU:

There is a way to get even better sharpness textures results with memory leak mod fix applied. Go to Nvidia Control Panel, to ur witcher3.exe game settings, and change Image Sharpening settings to Sharpen: 1.0, set ok and Apply. You could change "ignore film grain" aslo like you want, but i personaly prefer to leave it at 0.17 it's ok.
If 1.0 is too intense for you then change value that you prefer more, i think Sharpen 0.5 or 0.7 should be enough/

Screen:
Spoiler:  
Show



its seems that in Turing or other Nvidia GPU image scaling repleace image sharpening:
https://www.reddit.com/r/nvidia/comments/yyvb1o/why_did_the_image_scaling_replace_image/
if you don't see Image Image sharpening option, then do this trick with Image scaling:
https://www.reddit.com/r/nvidia/comments/1030vh9/since_nvidia_disabled_dlss_sharpening_in_251_how/
if you disable globaly image scaling by 0, with the trick it will allow to change sharpness for game exe or you can disable image  scaling in regedit, that should brings back image sharpening back, go to:
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\nvlddmkm\FTS
and change EnableGR535 value to 0 (its give you EnableGR535= 0x00000000 ), if that's dosn't help then use DLSS to FSR 2.1.2 mod with my settings file.


For AMD / Intel GPU:

Download FSR 2 to FSR 2.1.2 mod from point 2) and change nvngx.ini settings that is included in mod files and edit:

[Sharpening]
EnableSharpening=true ( from false to true enable sharpness setting with FSR)
Sharpness=1.0 (sharpness intensity that you can change from 0.0 to 1.0)
SharpnessRange=normal  (can be set to normal or extended but normal looks better for me)

- you can also download configurated nvngx.ini  in my mod files

2) improve FSR 2 to better quality FSR 2.1.2 mod (recommended mostly for AMD/ Intel GPUs ):


Download
mod: DLSS Unlocker for all GPUs including AMD Radeon and unpack all files to folder: 

<The Witcher 3 instalation folder>/bin/x64_dx12
and replace
all files

AMD and Intel GPU users (Nvidia don't need it because still DLSS 3.5 has better quality), that can improve image overall sharpness and quality, you can use mod to replace DLSS AA to FSR 2.1.2 (for AMD) or XeSS (for Intel), which one is near identical to DLSS in quality, far more better then in game FSR 2.0 and it may offer even better performance.

all fies ( before that just make copy/backup of this folder)
- Start up the game, set AA to the now unlocked "DLSS" setting
(the mod bypasses the RTX GPU check and hooks FSR/XeSS in DLSS's place)
- Restart the game and that's it.
Here is how it's look:
https://imgsli.com/MTY0OTU3/2/1 (ofc without mem fix, this is only for compare)


3) Highly recommend to change in game graphic settings Textures Quality only at High Settings ( maximum Ultra if you have minimum 12GB VRAM GPU)


if you want better texture quality with High Texture settings, then just lower value of ForceCustomMipBias= to -1.0 or even lower ( lower number = better image quality but higher VRAM usage, max is -2.0 but at max this fix will be almost useless).This will be less VRAM damanding then Ultra settings without significant decline in texture quality.

Here you can compare texture quality with and without fixes:

https://imgsli.com/MTcxMzY0/3/6

4) Check also my other mod: All-in-One RT Performance Tweak that can improve ur RT peformance from ~25% up to 50% FPS boost:






Change log:
Spoiler:  
Show

18.04.2023 Update 1.1
Thanks to RagnarofKlausenburg sugestion i have tested many MipBias configurations with diffrent
settings. I have concluded when CustomMipBias is enabled, then changing
textures quality above High changes almost nothing, there is almost no
noticeable differences when ForceCustomMipBias is not max -2.0 (and it can;'t be, otherwise fix wont work). If CustomMipBias is set to True and ForceCustomMipBias is Higher than or equal to -1.0
(higher value = worse, lower = better), then increasing texture settings
beyond High almost nothing improve in their quality (specifically,
TextureMipBias values lower than 0.00 stop working when CustomMipBias is True, in default for Textures on High TextureMipBias value is =-0.4 , for Ultra is -1.0 and -2.0 for Ultra+). Additionally,
setting higher texture quality than High significantly increases VRAM
memory usage and causes a heavy load on data transfer from the graphics
card to virtual memory and RAM. With CustomMibBias enabled only lower
valuses of ForceCustomMipBias can signifly increse textures quality but for cost of vram usage and data load.