top of page

UE5 Stylized Shadow Shader

A custom shadow shader made in Unreal that replaces standard shadows with bold, stylized ones. It blends patterns, outlines, and color in screen space to give shadows a more graphic, controllable look.

UE5 Stylized Shadow Shader

This shader came out of wanting more control over how shadows look in my stylized projects. The built-in shadows in Unreal are great for realism, but they don’t really give you much room to push a specific look. I wanted something that felt more intentional, where shadows could have texture, pattern, and actually support the art style instead of just darkening things.


1. Shadow Masking

The first step is figuring out what counts as a shadow. I used scene depth to build a simple mask in screen space. If something’s far enough from the light, it gets marked as a shadow. It’s fast, and since it all happens in post, it doesn’t depend on how the lights are set up.


2. Pattern Fill

Instead of just making the shadows darker, I layered in a world-aligned texture. That way the shadows can have stripes, noise, or whatever pattern fits the look. Because it’s world-aligned, the pattern stays stable as the camera moves, no weird swimming or distortion.


3. Blending with Scene Color

To make sure the shadows still feel connected to the world, I blended the pattern back with the original scene color. It’s kind of like layering ink over the final render: it keeps the forms readable without flattening everything out completely.


4. Rim Lighting

Sometimes the shadow areas got a little too flat, so I added a fresnel-based rim light that you can turn on or off. It helps bring back some shape around the edges without needing to add extra lights or change the material.


5. Outlines

I also included a post-process outline effect that works based on depth differences. This gives you clean edge lines around objects, even when they’re fully in shadow. It helps the whole thing feel more drawn or inked, really useful for the comic-style visuals I was looking for.


6. Controls for Artists

All of it’s exposed in the material: shadow strength, pattern scale, outline thickness, rim intensity. There are also toggles to swap styles or invert the shadows entirely. The goal was to make something flexible enough that artists could dial it in without having to open the shader graph.


In the end, this was just about exploring how shadows could do more than they usually do. It started as a small experiment, but it turned into a way to think differently about lighting and style: not by replacing what Unreal does, but by building something that could sit on top of it and offer a different kind of control.

Built with:

Unreal Engine 5

bottom of page