top of page

Custom shaders in UE5

I worked on these effects for 2 months in UE5. During this time I used HLSL, C++ and material graphs to create shaders that could be implemented in a grimdark style shooter. 

My main goal was to familiarize myself with with UE5 as a graphics programmer.

Project repo can be found here.

To see the effects in action, check out our game on Steam.

Material graphs, external shaders and custom render passes

  • Goal:

    • Explored different methods to create shaders in Unreal Engine 5.

  • Methods researched:

    • Material Graph

    • Custom Nodes

    • Custom Render Passes (Global Shaders & Scene View Extensions)

  • For a full breakdown and tutorial, see my post here.

Pros

Cons

Material
graph

  • Good for simple shaders.

  • Becomes messy with complex logic (e.g., no for-loop support).

Custom nodes

  • Allows including external .ush files.

  • Can be used with HLSL 

  • Easier with a game module, but requires setup.

  • Not recommended for beginners—UE5 won’t optimize code inside custom nodes like it does in the graph.

Global shaders

  • Ideal for performance-heavy shaders due to minimal overhead.

  • Most complex setup.

  • Built the effect using:

    • A refractive material for wave distortion

    • A post-process material (HLSL via custom node) for color/texture overlay

    • A particle emitter for the wave motion

  • Iteration process:

    • V1: Smoke direction felt off; lacked a tech-inspired look

    • V2: Wave was too short and subtle; edge effect needed screen-space application

    • V3: Final version added a textured blue overlay and extended, more visible refraction

V1

V2

V3

Fog effect

  • Purpose:

    • Fog was designed to reflect the player's insanity level by reducing visibility.

  • Challenge:

    • Needed consistent visual quality during camera movement and rotation.

  • Solution:

    • Used pre-calculated 3D Perlin noise for stable, volumetric fog.

  • Additional Detail:

    • Applied edge noise using a Sobel matrix for lightweight yet effective edge detection, after testing other methods.

Glitch effect

  • Goal: Created a glitch effect for the low HP state.

  • Components (stacked together):

    • Color aberration

    • Block shifting/distortion

    • Vertical scan lines via sine waves

    • Glitch pulses using another sine wave

  • Used a custom node with an external shader file since the algorithm required a for loop.

  • Combined with a simple double vision shader for final effect.

Push effect

2aeMZRM.gif
GDWC_2025_Summer-Student-Finalist-white.png

Karolina
Motužytė

Graphics programmer

Hi! I am Karolina. I am a C++ programmer that specializes in DX12 graphics, which I study at Breda University of Applied Sciences. Currently I am looking for an internship for 2025 September.

Here you will be able to see my work, both in custom engines and UE5 :)

plus_logo_c_icon_214621 (1).png
images.png
hd-unreal-engine-white-logo-icon-png-7017516949697958pnkct2kiz.png
c-icon-1820x2048-2ys190xs.png
github.png
perforce_logo_icon_248875 (1).png
GDWC_2025_Summer-Student-Finalist-white.png

Check out my work!

bottom of page