For someone who has been working with Unreal Engine for just about a year, the learning curve can feel pretty steep. The engine exposes a huge number of properties and console variables, and when you first encounter them it can feel like opening a control panel with way too many buttons and absolutely no labels.
In this blog, I’ll talk about a fairly simple concept (although it felt quite complex to me when I first ran into it) and try to explain it in simpler terms. Think of this as me trying to document the things I painfully figured out so that future-me doesn’t have to go through the same confusion again.
The main purpose of writing this is honestly selfish: it’s a note to my future self. When I inevitably stumble upon these settings again months later and wonder “why on earth did we tweak this?”, I’m hoping this post saves me from going down the same rabbit hole again.
And if this ends up helping someone else who is also staring at the same mysterious settings panel… well, that’s a nice bonus.
The Problem?
We have a Directional Light set up in a large level that is responsible for casting shadows on a few selected actors. Interestingly, when these shadows were cast on a vehicle, they appeared sharp at close range but started getting noticeably blurrier just around 2–3 meters away from the camera.
Naturally, the expectation was for the shadow to remain seamless, without this slightly dramatic drop in quality.
Is Quick Solution the Best Solution?
After taking a quick look into the famous BaseScalability.ini which sits in the Config folder of the Engine, I found a scalability group setting for shadows. Scalability Groups are divided into Low, Medium, High, Epic & Cinematic, corresponding to 0, 1, 2, 3 & Cine identifiers in the ini file.
Since I was debugging this for a High end device, I looked at the CVars under [ShadowQuality@2] section of the file and tweaked the property r.Shadow.DistanceScale to get a seamless, crisp shadow across the vehicle.
I wasn’t really in the mood to just make a quick change and escape the responsibility for this problem—especially since I’m usually the one breaking my head trying to squeeze out a few extra milliseconds of frame time so our devices don’t start doubling as hand warmers while running the game.
So instead, I decided to dig a little deeper and try to understand what these many shadow-related settings actually mean. I’m definitely not going to cover all of them here (mostly because I don’t know all of them), but I’ll walk through the ones I managed to study and experiment with.
Shadow Settings
r.Shadow.CSM.MaxCascades
Cascades are essentially distance ranges; the camera view is split into these ranges.
Each cascade has its own shadow map.
More cascades generally improve shadow quality at farther distances, but they also increase GPU cost.
r.Shadow.MaxResolution
Sets the maximum resolution allowed for dynamic shadow maps generated by lights. This directly affects how sharp the shadows appear.
Higher resolution = sharper shadows, but also higher GPU memory usage and rendering cost.
r.Shadow.MaxCSMResolution
Sets the maximum resolution specifically for Cascaded Shadow Maps generated by Directional Lights (for example, the Sun).
This is separate from regular shadow maps and applies specifically to cascaded shadows.
r.Shadow.RadiusThreshold
Controls when objects stop casting dynamic shadows based on their screen size. If an object appears smaller than this threshold on screen, it will not cast a shadow.
This helps reduce shadow rendering cost for tiny distant objects. Increasing this value can give some performance gains, at the cost of small objects no longer casting shadows.
Example: If the value is 0.04, any object occupying less than 4% of the screen height will not cast a shadow.
r.Shadow.DistanceScale
Scales the maximum distance from the camera where dynamic shadows are rendered.
A lower value reduces the shadow rendering distance, while a higher value extends shadows further into the scene.
This directly impacts how far the shadowed region extends and proportionally affects the GPU cost as well.
So yes — the quick “just increase the quality” solution wasn’t really the best solution after all, was it?
Stop looking at the Shadow; Maybe check the Light?
Now, lets look at a few properties of Directional Light that we have in our Level.
Cascaded Shadow Maps section of the Directional Light has the following:
Dynamic Shadow Distance StationaryLight
DynamicShadowDistanceStationaryLight
How far from the camera dynamic shadows from directional light are rendered; Within this distance, shadows are calculated in real time using CSMs; Beyond this distance, shadows switch to backed/static shadows (or disappear if none exist)
Num Dynamic Shadow Cascades
DynamicShadowCascades
How many cascades are used for directional light's CSM shadows; Instead of 1 large shadow map, camera view is divided into multiple distance slices; Each cascade gets its own shadow map.
Distribution Exponent
CascadeDistributionExponent
Controls how the cascades are distributed across the shadow distance; The range is from 1.0 to 4.0
This is the interesting one, where it took me a while to wrap me head around the concept:
Low Exponent (1.0)
Cascades are spread more evenly across the distance.
High Exponent (4.0)
More cascades are concentrated close to the camera; Lower detail farther away.
Wrapping up
Consider that the following was the Directional Light setup:
Dynamic Shadow Distance = 20000 units
Num Cascades = 4
Distribution Exponent = 3.0
In this case, the cascade boundaries are defined like this:
And this would explain why at a distance of roughly 3 meters (312.5 unreal units) from the camera we saw a drop in shadow quality which is where the next cascade began.
If we change this the Distribution Exponent to 2, it affects the cascades like this:
which means the quality drop will happen at 12.5 meters instead of 3.12 meters.
Trade-off?
Of-course there is a trade-off!
The max CSM resolution of 2048 was originally being used for a relatively small coverage distance of 3.12 meters. After changing the cascade distribution, the same resolution is now covering a much larger range of 12.5 meters.
What this means in practice is that the shadow texel density (texels per world unit) decreases. In simpler terms, the same number of texels now has to cover a larger area of the world, which naturally makes the shadow appear softer.
Important Insight
This does not mean that the entire scene suddenly becomes 4× blurrier.
In reality, only Cascade 1 changes dramatically because its coverage area increases significantly. Meanwhile, Cascades 2–4 actually get sharper when using a distribution exponent of 2, since more shadow resolution is now concentrated closer to the camera.
That’s pretty much the rabbit hole I went down while trying to understand why a shadow decided to become blurry a few meters away from the camera.
The takeaway for me was simple: many of these Unreal settings don’t exist in isolation. Changing one value often shifts the balance somewhere else—sometimes improving one cascade while quietly hurting another. Understanding that trade-off is far more useful than blindly pushing everything to higher values.
More importantly, the next time I see a shadow doing something strange, at least I’ll know where to start looking.
And hopefully, future-me will thank present-me for writing this down.





Top comments (0)