Everything you need to know about colored shadow penumbra tech art fragments.
[ad_1]Some time ago I saw this effect implemented by Romain Durand on a social media post where the penumbra regions of a light’s shadows would get additional color, known as Colored Penumbra or Colored Shadow Terminator. I really liked the effect and took a stab at it, and now I’m making it available. If you’re curious this Medium article by Shahriar Shahrabi goes through some of the theory.
There’s different ways to go about an implementation and I’ve decided to edit the Engine Shaders for this which (like everything) has pros and cons:
- It’s easy, no need to guess which values correspond to light or shadow (as you would with a PostProcess solution) which can be painful with Lumen or day/night cycles
- Works with all light types
- The implementation is extremely cheap
- The color saturation is only configurable across the board (not per light or per scene)
- It needs wide penumbras for the effect to be visible
- The implementation is only for Dynamic Lights, not Baked
We’re only editing the engine shaders but not the engine itself so we can stick to the Launcher version, as I’ve gone more in detail in my previous post about Editing the Engine Shaders so make sure you read it to understand what that entails.
Implementation
If you’re using Substrate open the EngineShadersPrivateSubstrateSubstrateDeferredLighting.ush file:
At line 190 (in UE 5.7) find the following code:
float3 SpecularLuminance = BSDFEvaluate.IntegratedSpecularValue * LightData.SpecularScale;
and right after that add the following:
// Colored shadow penumbra - Start
const float PenumbraSaturation = 4.0f; // configure this to your liking (1.0 means no change)
float3 LuminanceFactors = float3(0.3f, 0.59f, 0.11f); // Luminance factor for desaturation
float3 PenumbraColor = dot(DiffuseLuminance, LuminanceFactors); // Desaturate
PenumbraColor = lerp(PenumbraColor, DiffuseLuminance, PenumbraSaturation); // Apply saturation (inverse desaturation)
DiffuseLuminance = lerp(DiffuseLuminance, PenumbraColor, 1.0f - BSDFShadowTerms.SurfaceShadow); // Blend
// Colored shadow penumbra - End
If you’re not using Substrate open the EngineShadersPrivateDeferredLightPixelShaders.usf file:
At line 397 (in UE 5.7) find the following code:
and right after that add the following:
// Colored shadow penumbra - Start
const float PenumbraSaturation = 4.0f; // configure this to your liking (1.0 means no change)
float3 LuminanceFactors = float3(0.3f, 0.59f, 0.11f); // Luminance factor for desaturation
float3 PenumbraColor = dot(OutColor.xyz, LuminanceFactors); // Desaturate
PenumbraColor = lerp(PenumbraColor, OutColor.xyz, PenumbraSaturation); // Apply saturation (inverse desaturation)
OutColor.xyz = lerp(OutColor.xyz, PenumbraColor, 1.0f - SurfaceShadow); // Blend
// Colored shadow penumbra - End
Save the shader file, go back to Unreal and press Ctrl + Shift + ., then go make some coffee while it recompiles shaders.
That’s it. I did say it was easy 🙂
Here’s some comparison shots with and without colored penumbra, shown on a couple of scenes from Quixel:
The effect is quite strong in these comparison shots for display purposes, and you’ll probably want to configure the PenumbraSaturation value to be lower. Also as you can see in the code this implementation alters the surface color to be more saturated, so note gray or fully-saturated surfaces will not have any effect.
If you have any comments or questions feel free to reply to the relevant Twitter post, Bluesky post, ArtStation post or LinkedIn post.
[ad_2]
Source link
More on colored shadow penumbra tech art fragments
Stay tuned for updates on colored shadow penumbra tech art fragments as the story develops. Related: Mobile & Accessories.
Colored shadow penumbra tech art fragments: Key Details Explained
Colored Shadow Penumbra – Tech Art Fragments — let’s break down what actually matters here. This one stands out because it touches the things buyers care about most: performance, features, and value for money. If you’re comparing options right now, it’s worth keeping on your shortlist.
Looking at the bigger picture, this fits into a wider trend where brands compete harder with every release cycle. Expect more details to surface as things develop, including confirmed specifications and pricing from official sources.
Should You Keep Following This?
If you follow mobile tech closely, the answer is yes. Developments like this could influence your next purchase decision, so it’s worth tracking. Bookmark this page — we’ll keep the coverage fresh as the story evolves.
Frequently Asked Questions
It is a tech art effect for Unreal Engine where the penumbra regions of a light's shadows get additional color, also called Colored Shadow Terminator, inspired by an implementation Romain Durand shared on social media.
By editing the engine shaders, not the engine itself, so you can stay on the Launcher version of UE. For Substrate you edit SubstrateDeferredLighting.ush at line 190 in UE 5.7; without Substrate you edit DeferredLightPixelShaders.usf at line 397.
Pros: easy, works with all light types, extremely cheap, no guessing light or shadow values. Cons: saturation is global not per-light, needs wide penumbras to be visible, dynamic lights only, and you must recompile shaders.
Adjust the PenumbraSaturation constant, set to 4.0f in the example where 1.0 means no change. The comparison shots use a strong value for display, and you will likely want it lower.




