# Using (external) HLSL in UE5

**URL:** <https://forums.unrealengine.com/t/using-external-hlsl-in-ue5/2099056>\
**Category:** Rendering\
**Tags:** c-c, c-class-wizard, c-and-bluepri, Post-Processing, c-custommeshcomponen, c-and-blueprint, c-error, c-class, c-custom-shape, c-programming, c-cone-shape, unreal-engine, hlsl, CPP\
**Created:** [November 1, 2024, 1:14pm UTC](https://forums.unrealengine.com/t/using-external-hlsl-in-ue5/2099056 "2024-11-01T13:14:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![CoastKid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CoastKid](https://forums.unrealengine.com/u/CoastKid)\
**Post date:** [November 6, 2025, 9:09pm UTC](https://forums.unrealengine.com/t/using-external-hlsl-in-ue5/2099056/3 "2025-11-06T21:09:45Z")

</div>

There is also a solution that do not require C++ and Visual Studio:

> [@Material expression custom - relative Include File Path?](https://forums.unrealengine.com/t/material-expression-custom-relative-include-file-path/468311/3):
>
> There’s a solution that works without Visual Studio and C++. I test it in two projects in 5.6. Here are the steps: Close your unreal project. In the root folder of your project, create a folder called “Shaders.” (Example: /YourProject/Shaders) Create shader file “MyLib.usf” in that folder . (Like this: /YourProject/Shaders/MyLib.usf) Open “MyLib.usf” file and put this code inside: struct MyFunc { float3 Go() { return float3(1, 0.2, 0); } }; Save MyLib.usf file Open y…

---

_[View the full topic](https://forums.unrealengine.com/t/using-external-hlsl-in-ue5/2099056)._
