Rays HLSL Shader in UE4 Material Custom Node

Rays HLSL Shader in UE4 Material Custom Node
Light rays HLSL shader in a UE4 material

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.ush shader file located at \content\HLSL\code\Rays.ush in the project files.
  • Before opening the project, Rays.ush must 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

ComponentDetailsUse Case
Custom Node ShaderHLSL inside a UE4.26 Material Custom NodeGenerates procedural light ray effects inside a material
Shader Include FileCopy \content\HLSL\code\Rays.ush to \Program Files\Epic Games\UE_4.26\Engine\Rays.ushRequired setup step before opening the UE4.26 project
Visual OutputLight rays, glows, and magic VFXGod 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.

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


Discover more from CGHOW

Subscribe to get the latest posts sent to your email.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.