Cyberpunk 2077

File information

Last updated

Original upload

Created by

Phenomenum

Uploaded by

Phenomenum

Virus scan

Safe to use

About this mod

Plain and simple INI tweak to adjust shadows distance and detalization with near zero perfomance impact.

Requirements
Permissions and credits
Changelogs
First of all, i want to thank stoker25 for uploading extracted INI settings - without this i've never know what to change.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This simple tweak modifies Cascade shadows range in order to get more detailed soft shadows and increased range for it. More small objects will cast shadows on the distance. Perfomance impact is quite negligeable.

Disclaimer: If you're using RT-shadows, you will see no difference. Cascade shadow maps belongs to classic rasterization rendering and have no relation to Raytracing. 

Let's start from scratch: how CP 2077 shadows works? This game using two types of shadows:

1. Cascaded Shadows. Rasterized shadow map divided into 4 "cascades" (0,1,2,3), and descreasing resolution with every next cascade. Cascade shadows processed by some kind of blur filter for nice soft look and have a smooth Time of Day transition. When the last cascade is over, the next shadow type go to work...
2. Distant shadows. Also a rasterized shadow map, but much smaller resolution than cascade shadows, have no nice soft filter, and have no smooth ToD repositioning - shadows will change their position every 2-3 seconds. Looks very ugly and pixelized.

The good news: we can safely stretch "cascades" without noticeble shadow quality drop, and bring more details to close and mid range shadows by stretching higher resolution shadow maps a litlle further than vanilla settings.



The INI changes are: 

[Rendering/Shadows]
CascadeRange0 = 12.000000 - increases range of detailed soft shadows from 6 to 12 meters from player
CascadeRange1 = 30.000000 - increases range of mid-detailed soft shadows from 20 to 30 meters from player
CascadeRange2 = 75.000000 - increases range of low-mid-detailed soft shadows from 50 to 75 meters from player
CascadeRange3 = 150.000000 - increases range of low-detailed soft shadows from 100 to 150 meters from player


"CascadesHeuristicMinMeshAutohideDistInCascade0" = 0.100000 – descreases MINIMAL distance from player, where meshes of certain size WILL CAST shadows in cascade 0 spacing (yes, smaller numbers gives better results, because "MinAutohideDistance" - it's the minimal distance, where meshes (objects) will cast shadows)

I've seen a couple of INI tweaks, which increases "CascadesHeuristicMinMeshAutohideDistInCascade" values to 100 or so. This is are huge mistake. Increasing these values will NOT increase shadow cast distance or detail, but CUT cascade shadows for small meshes (objects).

For example True next-gen shadows at Cyberpunk 2077 Nexus - Mods and community (nexusmods.com) cuts cascades3 shadows for small objects, even worse than vanilla (vanilla value is 50). Because of one f///ng wrong value)

All in all (in a simple words), "CascadesHeuristicMinMeshAutohideDistInCascade" value defines at which distance FROM player meshes bigger than "CascadesHeuristicMinMeshSize" shadow will cast cascade shadows.

And "CascadesHeuristicMinMeshSize" value defines the size of meshes which will cast cascade shadows in certain distance, within corresponding "CascadeRange" spacing. Sorry for my totally broken english)

CascadesHeuristicMinMeshAutohideDistInCascade1 = 10.000000 – increases distance, where meshes of certain size will cast shadow in cascade 1
CascadesHeuristicMinMeshAutohideDistInCascade2 = 25.000000 – increases distance, where meshes of certain size will cast shadow in cascade 2
CascadesHeuristicMinMeshAutohideDistInCascade3 = 50.000000 – increases distance, where meshes of certain size will cast shadow in cascade 3
CascadesHeuristicMinMeshSizeInCascade0 = 0.100000 - minimal size of meshes which will cast shadow in cascade 0. Divided in twice of vanilla
CascadesHeuristicMinMeshSizeInCascade1 = 0.250000 - minimal size of meshes which will cast shadow in cascade 1. Divided in twice of vanilla
CascadesHeuristicMinMeshSizeInCascade2 = 0.750000 - minimal size of meshes which will cast shadow in cascade 2. Divided in twice of vanilla
CascadesHeuristicMinMeshSizeInCascade3 = 1.000000 - minimal size of meshes which will cast shadow in cascade 3. Divided in twice of vanilla

Performance impact is still neglectable.