
What is the Rays HLSL Shader in UE4 Material Custom Node?
This tutorial demonstrates a light rays shader written in HLSL inside an Unreal Engine 4.26 Material Custom Node. It is designed for god rays, glows, and magic VFX in real-time materials.
How is the Rays HLSL Shader structured?
The effect combines custom HLSL code with a UE4.26 Material Custom Node and an external shader include file:
- Written in HLSL and evaluated inside an Unreal Engine 4.26 Material Custom Node.
- Uses the included
Rays.ushshader file located at\content\HLSL\code\Rays.ushin the project files. - Before opening the project,
Rays.ushmust be copied to\Program Files\Epic Games\UE_4.26\Engine\Rays.ush. - Suitable for god rays, glows, and magic VFX materials.
Rays HLSL Shader Breakdown
| Component | Details | Use Case |
|---|---|---|
| Custom Node Shader | HLSL inside a UE4.26 Material Custom Node | Generates procedural light ray effects inside a material |
| Shader Include File | Copy \content\HLSL\code\Rays.ush to \Program Files\Epic Games\UE_4.26\Engine\Rays.ush | Required setup step before opening the UE4.26 project |
| Visual Output | Light rays, glows, and magic VFX | God rays, stylized glows, and magical effects |
Tutorial Access & Project Files
Project files for this shader are available on Patreon. Before opening the downloaded UE4.26 project, copy Rays.ush from \content\HLSL\code\Rays.ush to \Program Files\Epic Games\UE_4.26\Engine\Rays.ush.
- Watch the full video tutorial: Rays HLSL Shader in UE4 Material Custom Node on YouTube
- Project Files: Download Project Files from Patreon (remember to copy
Rays.ushinto the UE_4.26 Engine folder before opening) - More ray effects: Rays Material FX · Lightning Ball FX · Galaxy Parallax Material
Frequently asked questions
How do I set up Rays.ush before opening the UE4.26 project?
Before opening the project, copy the Rays.ush file from \content\HLSL\code\Rays.ush to \Program Files\Epic Games\UE_4.26\Engine\Rays.ush.
Which Unreal Engine version and node are used for this rays shader?
This shader is written in HLSL inside an Unreal Engine 4.26 Material Custom Node.
What effects can I use this HLSL rays shader for?
It works well for god rays, glows, and magic VFX in Unreal Engine materials.
More like this: HLSL Triangle code to UE4 Material nodes Tutorial · Grid HLSL Shader in UE4 Material Custom Node


Leave a Reply