# \#hlsl

**URL:** https://forums.unrealengine.com/tag/hlsl/2444.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [How to properly use DoubleFloats in a compute shader?](https://forums.unrealengine.com/t/how-to-properly-use-doublefloats-in-a-compute-shader/2747453)

<div class="topic-metadata">

**Author:** [@Aejjee](https://forums.unrealengine.com/u/Aejjee)\
**Replies:** 0\
**Last updated:** [August 31, 2026, 12:53am UTC](https://forums.unrealengine.com/t/how-to-properly-use-doublefloats-in-a-compute-shader/2747453 "2026-08-31T00:53:42Z")

</div>

I have the following compute shader code that works where I use double3s: RWStructuredBuffer\<double3\> Positions; uint NSoldiers; \[numthreads(GROUP\_SIZE, 1, 1)\] void main(uint3 DispatchThreadID : SV\_DispatchThreadID, …

---

## [Division can be slightly off in materials custom node with parameter input](https://forums.unrealengine.com/t/division-can-be-slightly-off-in-materials-custom-node-with-parameter-input/2743367)

<div class="topic-metadata">

**Author:** [@BOBtheROSS](https://forums.unrealengine.com/u/BOBtheROSS)\
**Replies:** 0\
**Last updated:** [August 12, 2026, 10:00pm UTC](https://forums.unrealengine.com/t/division-can-be-slightly-off-in-materials-custom-node-with-parameter-input/2743367 "2026-08-12T22:00:08Z")

</div>

Summary division that should result in 1.0 will be ~0.99999995 (the next lower value to 1.0 in a 32bit float) in the custom node (in materials) factors to reproduce: affects division in custom node (HLSL) the divisor …

---

## [division in materials custom node (HLSL) is bad](https://forums.unrealengine.com/t/division-in-materials-custom-node-hlsl-is-bad/2712103)

<div class="topic-metadata">

**Author:** [@BOBtheROSS](https://forums.unrealengine.com/u/BOBtheROSS)\
**Replies:** 0\
**Last updated:** [April 7, 2026, 2:48pm UTC](https://forums.unrealengine.com/t/division-in-materials-custom-node-hlsl-is-bad/2712103 "2026-04-07T14:48:55Z")

</div>

The custom node seems to be worse than the build in division node. Is this expected behaviour? problem: for var1 = 3.0 the HLSL code return var1/trunc(var1); does not return 1.0, but ~0.99999995 (the next lower value…

---

## [How to consider only specifc geometry in a custom hlsl raytracer](https://forums.unrealengine.com/t/how-to-consider-only-specifc-geometry-in-a-custom-hlsl-raytracer/2707091)

<div class="topic-metadata">

**Author:** [@BoardCogs](https://forums.unrealengine.com/u/BoardCogs)\
**Replies:** 0\
**Last updated:** [March 18, 2026, 6:28pm UTC](https://forums.unrealengine.com/t/how-to-consider-only-specifc-geometry-in-a-custom-hlsl-raytracer/2707091 "2026-03-18T18:28:39Z")

</div>

So, for the past three months or so I’ve been trying to setup a raytracing global shader that tries to simulate rays bouncing off of surfaces. The point is that I want to ignore most geometry and I only want to focus on …

---

## [PCG - HLSL - How to use 2nd Output Pin](https://forums.unrealengine.com/t/pcg-hlsl-how-to-use-2nd-output-pin/2692091)

<div class="topic-metadata">

**Author:** [@Frenetic](https://forums.unrealengine.com/u/Frenetic)\
**Replies:** 5\
**Last updated:** [February 26, 2026, 11:18pm UTC](https://forums.unrealengine.com/t/pcg-hlsl-how-to-use-2nd-output-pin/2692091 "2026-02-26T23:18:36Z")

</div>

Trying to use PCG with HLSL for making a landscape-grass replacement. It’s going well. However, I wanted to know if/how it’s possible to push points to a 2nd output in a custom HLSL node. I cull some points for grass …

---

## [Material expression custom - relative Include File Path?](https://forums.unrealengine.com/t/material-expression-custom-relative-include-file-path/468311)

<div class="topic-metadata">

**Author:** [@vinz9](https://forums.unrealengine.com/u/vinz9)\
**Replies:** 3\
**Last updated:** [February 11, 2026, 11:20pm UTC](https://forums.unrealengine.com/t/material-expression-custom-relative-include-file-path/468311 "2026-02-11T23:20:17Z")

</div>

Hello, I was hoping I could use a relative file path pointing to a file inside the content folder, however using /Game/Shaders/myHeader.ush I get the error “Can’t map virtual shader source path …” "Directoy mappings ar…

---

## [Access UV float bits in shader](https://forums.unrealengine.com/t/access-uv-float-bits-in-shader/2696098)

<div class="topic-metadata">

**Author:** [@Apgar426](https://forums.unrealengine.com/u/Apgar426)\
**Replies:** 1\
**Last updated:** [February 3, 2026, 1:24am UTC](https://forums.unrealengine.com/t/access-uv-float-bits-in-shader/2696098 "2026-02-03T01:24:51Z")

</div>

Hello, I have a shader where I’m trying to access the bits of a UV float value with a custom HLSL node. It would be useful for packing data into UVs more flexibly. The code starts out with a simple test: uint bits = asu…

---

## [\[PLUGIN\] Blender Cavity Post Process – Great for Cartoon-Style and Stylized Shading](https://forums.unrealengine.com/t/plugin-blender-cavity-post-process-great-for-cartoon-style-and-stylized-shading/2020397)

<div class="topic-metadata">

**Author:** [@HubberStudios](https://forums.unrealengine.com/u/HubberStudios)\
**Replies:** 1\
**Last updated:** [January 19, 2026, 12:26pm UTC](https://forums.unrealengine.com/t/plugin-blender-cavity-post-process-great-for-cartoon-style-and-stylized-shading/2020397 "2026-01-19T12:26:47Z")

</div>

Hello Unreal Community! We’re excited to announce the release of Cavity And Curvature Post Process, a user-friendly shader plugin now available on the Unreal Marketplace! :tada: What does it do? Inspired by Blender’s …

---

## [How to fix the issue of inconsistent diffuse color between transparent forward shading rendering and deferred shading ](https://forums.unrealengine.com/t/how-to-fix-the-issue-of-inconsistent-diffuse-color-between-transparent-forward-shading-rendering-and-deferred-shading/2685751)

<div class="topic-metadata">

**Author:** [@Captainnnrex](https://forums.unrealengine.com/u/Captainnnrex)\
**Replies:** 0\
**Last updated:** [December 17, 2025, 3:46pm UTC](https://forums.unrealengine.com/t/how-to-fix-the-issue-of-inconsistent-diffuse-color-between-transparent-forward-shading-rendering-and-deferred-shading/2685751 "2025-12-17T15:46:11Z")

</div>

In Unreal Engine version 5.6, when using forward shading transparency rendering, the brightness is noticeably brighter compared to deferred rendering. We used Cloth ShadingModel and, after some searching, added \`if (GBuf…

---

## [SceneTextureLookup(UV ,PPI\_PostProcessInput0, false) broken UVs!?](https://forums.unrealengine.com/t/scenetexturelookup-uv-ppi-postprocessinput0-false-broken-uvs/1260326)

<div class="topic-metadata">

**Author:** [@dreampunchboy](https://forums.unrealengine.com/u/dreampunchboy)\
**Replies:** 2\
**Last updated:** [November 28, 2025, 10:57am UTC](https://forums.unrealengine.com/t/scenetexturelookup-uv-ppi-postprocessinput0-false-broken-uvs/1260326 "2025-11-28T10:57:24Z")

</div>

Hi. I’m having this odd problem with SceneTextureLookup’s UVs in a custom node: Top part is UVs plugged into the SceneTexture and it’s working perfectly as you can see below Bottom part (the issue) is a custom node…

---

## [Using (external) HLSL in UE5](https://forums.unrealengine.com/t/using-external-hlsl-in-ue5/2099056)

<div class="topic-metadata">

**Author:** [@Kay\_2023](https://forums.unrealengine.com/u/Kay_2023)\
**Replies:** 2\
**Last updated:** [November 6, 2025, 9:09pm UTC](https://forums.unrealengine.com/t/using-external-hlsl-in-ue5/2099056 "2025-11-06T21:09:45Z")

</div>

As a UE5 newbie with some graphics programming experience, I scarcely found resources on how to use external HLSL shaders in the engine as you would in other engines like Unity. For this reason I spent the past two mont…

---

## [Using Mesh Paint Texture Object or Texture Collection Object in Custom HLSL Node](https://forums.unrealengine.com/t/using-mesh-paint-texture-object-or-texture-collection-object-in-custom-hlsl-node/2662325)

<div class="topic-metadata">

**Author:** [@aledram\_00](https://forums.unrealengine.com/u/aledram_00)\
**Replies:** 1\
**Last updated:** [October 27, 2025, 9:50am UTC](https://forums.unrealengine.com/t/using-mesh-paint-texture-object-or-texture-collection-object-in-custom-hlsl-node/2662325 "2025-10-27T09:50:50Z")

</div>

Basically I’m attempting to feed either a Mesh Paint Texture Object or a Texture Object from a Bindless Texture Collection to a POM custom node input so to use that as a blend mask between two different height maps. I sa…

---

## [Port Shadertoy JPEG compression GLSL shader to Unreal Engine](https://forums.unrealengine.com/t/port-shadertoy-jpeg-compression-glsl-shader-to-unreal-engine/1727835)

<div class="topic-metadata">

**Author:** [@Barti1](https://forums.unrealengine.com/u/Barti1)\
**Replies:** 2\
**Last updated:** [October 25, 2025, 6:22pm UTC](https://forums.unrealengine.com/t/port-shadertoy-jpeg-compression-glsl-shader-to-unreal-engine/1727835 "2025-10-25T18:22:49Z")

</div>

Hi everyone, I recently found a JPEG compression shader on shadertoy: I was wondering, if it is possible to translate the shader code from GLSL to HLSL and use it in a custom node in a post-processing material. My ap…

---

## [Render target packing optimizations](https://forums.unrealengine.com/t/render-target-packing-optimizations/2659638)

<div class="topic-metadata">

**Author:** [@SlayerOfWhales](https://forums.unrealengine.com/u/SlayerOfWhales)\
**Replies:** 1\
**Last updated:** [September 25, 2025, 6:16am UTC](https://forums.unrealengine.com/t/render-target-packing-optimizations/2659638 "2025-09-25T06:16:42Z")

</div>

Hello, I have been working on a simple water sim for fun lately and have come to a divergence point regarding the structure of the project. Let’s consider three single channel, low precision render targets: Foam, Old fo…

---

## [Sample Volume Texture (Custom HLSL)](https://forums.unrealengine.com/t/sample-volume-texture-custom-hlsl/2651872)

<div class="topic-metadata">

**Author:** [@Scottimus06](https://forums.unrealengine.com/u/Scottimus06)\
**Replies:** 4\
**Last updated:** [August 29, 2025, 7:51pm UTC](https://forums.unrealengine.com/t/sample-volume-texture-custom-hlsl/2651872 "2025-08-29T19:51:54Z")

</div>

Howdy, There are some great resources for HLSL and materials out there BUT for volume textures things seem pretty sparse (except for sparse volume textures :stuck\_out\_tongue: which seem to have some more popularity due …

---

## [Inverse Projection Matrix - Custom HLSL Node](https://forums.unrealengine.com/t/inverse-projection-matrix-custom-hlsl-node/2635951)

<div class="topic-metadata">

**Author:** [@Mad.King](https://forums.unrealengine.com/u/Mad.King)\
**Replies:** 5\
**Last updated:** [August 11, 2025, 8:31pm UTC](https://forums.unrealengine.com/t/inverse-projection-matrix-custom-hlsl-node/2635951 "2025-08-11T20:31:37Z")

</div>

Is this the correct way to construct an inverse projection matrix? Projections and matrices are an elusive concept to me. I’ve basically just been trying to piece together the correct solution based on info I could find …

---

## [\[CONTRACT\] Graphics / Rendering engineer or Technical Artist for custom VR anti-aliasing method](https://forums.unrealengine.com/t/contract-graphics-rendering-engineer-or-technical-artist-for-custom-vr-anti-aliasing-method/2637812)

<div class="topic-metadata">

**Author:** [@ZyLogic](https://forums.unrealengine.com/u/ZyLogic)\
**Replies:** 0\
**Last updated:** [August 11, 2025, 11:50am UTC](https://forums.unrealengine.com/t/contract-graphics-rendering-engineer-or-technical-artist-for-custom-vr-anti-aliasing-method/2637812 "2025-08-11T11:50:14Z")

</div>

Cypher Interactive is looking for an experienced Graphics / Rendering engineer or Technical Artist to fulfil a contract job for a high-performance VR project. Project type: Game Virtual Reality Job type: External /…

---

## [Niagara Data Channels - how to read from NDC in custom HLSL node?](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675)

<div class="topic-metadata">

**Author:** [@DFined](https://forums.unrealengine.com/u/DFined)\
**Replies:** 4\
**Last updated:** [July 3, 2025, 3:35am UTC](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675 "2025-07-03T03:35:34Z")

</div>

So I was wondering if anyone knows a good way to read from a Niagara Data Channel in a custom HLSL node? I can pass an NDC Reader as an input and I can call read/consume on it in HLSL, but these functions take variadic p…

---

## [Where to find introduction info about HLSL in UE](https://forums.unrealengine.com/t/where-to-find-introduction-info-about-hlsl-in-ue/2456911)

<div class="topic-metadata">

**Author:** [@M.S.M.A.S](https://forums.unrealengine.com/u/M.S.M.A.S)\
**Replies:** 4\
**Last updated:** [June 28, 2025, 11:13pm UTC](https://forums.unrealengine.com/t/where-to-find-introduction-info-about-hlsl-in-ue/2456911 "2025-06-28T23:13:51Z")

</div>

I know a little of HLSL, but HLSL in UE is different than Pixel or Vertex shader, I saw this article There’s a line that says in this example Tex is a color, but Colors are suppose to be RGBA but it has an ID p…

---

## [Is there a way to bake deformer graph animations in level sequencer into an animation sequence](https://forums.unrealengine.com/t/is-there-a-way-to-bake-deformer-graph-animations-in-level-sequencer-into-an-animation-sequence/2298398)

<div class="topic-metadata">

**Author:** [@jakesjordan](https://forums.unrealengine.com/u/jakesjordan)\
**Replies:** 24\
**Last updated:** [June 24, 2025, 10:09pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-bake-deformer-graph-animations-in-level-sequencer-into-an-animation-sequence/2298398 "2025-06-24T22:09:39Z")

</div>

I have a squash and stretch deformer graph on a control rig I am testing. Everything works in the control rig editor and the level sequence, but when I bake to an animation sequence none of the deformer graph animations …

---

## [Custom Node Missing in UEFN Material Editor](https://forums.unrealengine.com/t/custom-node-missing-in-uefn-material-editor/2349701)

<div class="topic-metadata">

**Author:** [@31Asha](https://forums.unrealengine.com/u/31Asha)\
**Replies:** 7\
**Last updated:** [May 30, 2025, 5:13pm UTC](https://forums.unrealengine.com/t/custom-node-missing-in-uefn-material-editor/2349701 "2025-05-30T17:13:07Z")

</div>

Summary In Unreal Editor for Fortnite (UEFN), the Custom Node is missing from the Material Editor. Unlike in Unreal Engine 5, where you can use a Custom Node to write HLSL code directly, this feature does not appear in U…

---

## [SDFs to Dynamic Meshes ](https://forums.unrealengine.com/t/sdfs-to-dynamic-meshes/2451460)

<div class="topic-metadata">

**Author:** [@addyhush1](https://forums.unrealengine.com/u/addyhush1)\
**Replies:** 0\
**Last updated:** [April 11, 2025, 4:16pm UTC](https://forums.unrealengine.com/t/sdfs-to-dynamic-meshes/2451460 "2025-04-11T16:16:56Z")

</div>

Hi there computer graphics programmers! My goal is to translate moving SDF shapes into dynamic meshes in runtime. I know, runtime mesh generation is not precisely lightweight but I see a lot of potential in the realtim-…

---

## [Global Shaders and "Array of Textures"](https://forums.unrealengine.com/t/global-shaders-and-array-of-textures/501357)

<div class="topic-metadata">

**Author:** [@Panos\_Fakitsas](https://forums.unrealengine.com/u/Panos_Fakitsas)\
**Replies:** 5\
**Last updated:** [January 20, 2025, 10:14am UTC](https://forums.unrealengine.com/t/global-shaders-and-array-of-textures/501357 "2025-01-20T10:14:49Z")

</div>

Hi there people, this has to do with global shaders and hlsl code. I declare in the global shader file a parameter struct like this: BEGIN\_SHADER\_PARAMETER\_STRUCT(FParameters, ) SHADER\_PARAMETER\_TEXTURE\_ARRAY(Texture2…

---

## [Issue to read normal map from hlsl sampler.](https://forums.unrealengine.com/t/issue-to-read-normal-map-from-hlsl-sampler/2260011)

<div class="topic-metadata">

**Author:** [@Gabriel.Isart](https://forums.unrealengine.com/u/Gabriel.Isart)\
**Replies:** 1\
**Last updated:** [January 9, 2025, 12:53pm UTC](https://forums.unrealengine.com/t/issue-to-read-normal-map-from-hlsl-sampler/2260011 "2025-01-09T12:53:43Z")

</div>

Hi, everyone. I’ve been facing an issue recently. I’m trying to sample a normal map from a Texture2DArray using a custom HLSL node, but I can’t figure out why the normal map appears incorrect when sampled from my HLSL n…

---

## [UE支持使用直接使用HLSL文件作为材质着色器吗？](https://forums.unrealengine.com/t/ue-hlsl/2243052)

<div class="topic-metadata">

**Author:** [@Jagular\_a](https://forums.unrealengine.com/u/Jagular_a)\
**Replies:** 0\
**Last updated:** [December 26, 2024, 3:54am UTC](https://forums.unrealengine.com/t/ue-hlsl/2243052 "2024-12-26T03:54:52Z")

</div>

我了解到ue材质shader的实现是在材质编辑器中，通过连连看的方式实现的；Global Shader可以使用usf、ush文件，材质中使用hlsl则需要使用自定义节点与材质表达式结合的方式。 那么ue有没有一种方式，能够向Unity中一样，直接选择一个shader文件，文件中编写了顶点着色器、片元着色器这些内容，然后与UE的材质绑定就能够使用？或者有没有那种方法可以达到类似的效果？

---

## [How do i get Alpha from Texture object that I have passed into custom blur function? Or is it possible to use TextureSample instead Object?](https://forums.unrealengine.com/t/how-do-i-get-alpha-from-texture-object-that-i-have-passed-into-custom-blur-function-or-is-it-possible-to-use-texturesample-instead-object/485092)

<div class="topic-metadata">

**Author:** [@sayooj\_js](https://forums.unrealengine.com/u/sayooj_js)\
**Replies:** 3\
**Last updated:** [November 23, 2024, 1:52pm UTC](https://forums.unrealengine.com/t/how-do-i-get-alpha-from-texture-object-that-i-have-passed-into-custom-blur-function-or-is-it-possible-to-use-texturesample-instead-object/485092 "2024-11-23T13:52:09Z")

</div>

I am relatively new in HLSL, I am trying to implement blur for my new dynamic shadow material project. I can input Texture Object, but not TextureSample, and getting an error, Is there is any other function for TextureSa…

---

## [Sending an array (of structs) to a usf shader](https://forums.unrealengine.com/t/sending-an-array-of-structs-to-a-usf-shader/377601)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_c8cdff6f](https://forums.unrealengine.com/u/anonymous_user_c8cdff6f)\
**Replies:** 6\
**Last updated:** [November 20, 2024, 3:46pm UTC](https://forums.unrealengine.com/t/sending-an-array-of-structs-to-a-usf-shader/377601 "2024-11-20T15:46:25Z")

</div>

I’m trying to send an array of positions (and other info) to a usf pixel shader. I know I can send float, FMatrix, FVector stuff to the shader via the following macros: BEGIN\_UNIFORM\_BUFFER\_STRUCT(FMyPixelShaderVarPara…

---

## [why my HLSL code making engine crashed](https://forums.unrealengine.com/t/why-my-hlsl-code-making-engine-crashed/2122713)

<div class="topic-metadata">

**Author:** [@unmaless1199](https://forums.unrealengine.com/u/unmaless1199)\
**Replies:** 0\
**Last updated:** [November 14, 2024, 3:51pm UTC](https://forums.unrealengine.com/t/why-my-hlsl-code-making-engine-crashed/2122713 "2024-11-14T15:51:11Z")

</div>

I am learning the basic HLSL coding rightnow and i found couple video from youtube here is my code struct texDistort { float2 texScale(float2 uv, float2 scale) { float2 texScale = ( uv - 0.5) \* scale + 0.5; return…

---

## [Vertex clip?](https://forums.unrealengine.com/t/vertex-clip/386879)

<div class="topic-metadata">

**Author:** [@firelight322](https://forums.unrealengine.com/u/firelight322)\
**Replies:** 3\
**Last updated:** [September 11, 2024, 5:36pm UTC](https://forums.unrealengine.com/t/vertex-clip/386879 "2024-09-11T17:36:49Z")

</div>

Hello, I don’t believe there is a clip node for vertices. I am trying to us clip() in a custom expression, but Unreal complains about an unmapped expression and seems to believe I am trying to access a local variable. …

---

## [Accessing SceneColor in HLSL in Surface Material Domain](https://forums.unrealengine.com/t/accessing-scenecolor-in-hlsl-in-surface-material-domain/2010683)

<div class="topic-metadata">

**Author:** [@BlueBendyPencils](https://forums.unrealengine.com/u/BlueBendyPencils)\
**Replies:** 1\
**Last updated:** [September 8, 2024, 1:21pm UTC](https://forums.unrealengine.com/t/accessing-scenecolor-in-hlsl-in-surface-material-domain/2010683 "2024-09-08T13:21:22Z")

</div>

Hiii!! For a shader I’m setting up, I need to sample SceneColor through HLSL in a Custom Expression. I am doing this in a translucent surface material, not in a post-process material. I am offsetting the UVs that are us…

[Next page](https://forums.unrealengine.com/tag/hlsl/2444.md?match_all_tags=true&page=1&tags%5B%5D=hlsl)
