# Niagara Data Channels - how to read from NDC in custom HLSL node?

**URL:** <https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, hlsl, question\
**Created:** [June 26, 2024, 6:56pm UTC](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675 "2024-06-26T18:56:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DFined](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DFined](https://forums.unrealengine.com/u/DFined)\
**Post date:** [June 26, 2024, 6:56pm UTC](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675/1 "2024-06-26T18:56:22Z")

</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 parameters for outputs. The versions available in HLSL by default don’t output anything. I found the compiled shader files to see what happens if I use the actual read-from-ndc node and add some custom outputs and found the alternate functions it calls with the required outputs. However I don’t see a good way to call it from HLSL, as calling a function like “DataChannelReader.Consume(…)” gets transromed into something like “Consume\_TestModule\_DataChannelReader(…)”. And the function I actually need to call is something along the lines of “Consume\_TestModule\_DataChannelReader\_ColorLinearColor\_SpawnCountNiagaraInt32” but I can’t call that from my custom HLSL as it is not defined yet. I can kinda make it work by injecting the definition through a separate custom HLSL node but thats a horrific hack and also quite crash-prone. So I’d be glad to know if anyone knows the proper way to do this, as the search results so far turn out literally nothing for “Niagara data channel hlsl”

---

<div class="post-metadata">

**Author:** ![JL\_CA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JL\_CA](https://forums.unrealengine.com/u/JL_CA)\
**Post date:** [October 4, 2024, 1:15am UTC](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675/2 "2024-10-04T01:15:42Z")

</div>

Update after 5.5 preview on Oct 04, 2024.

I tried 5.5 preview. Still no read function in hlsl but the editor will not crash finally.

* * *

I tried for serval days and didn’t find a way to use NDC in custom HLSL…

Even when I connect an NDC reader to a custom HLSL node it will crush my Unreal editor. I am on 5.4.

Hope there is a better tutorial for that later.

---

<div class="post-metadata">

**Author:** ![2000ear1ybird](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2000ear1ybird](https://forums.unrealengine.com/u/2000ear1ybird)\
**Post date:** [December 19, 2024, 3:40pm UTC](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675/3 "2024-12-19T15:40:01Z")

</div>

I found a method that I tested to read the NDC correctly.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/1/ed1f82af6db30a7258470a2d052f8e3ebfa5cded.jpeg)

---

<div class="post-metadata">

**Author:** ![HadockAndChips](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HadockAndChips](https://forums.unrealengine.com/u/HadockAndChips)\
**Post date:** [March 11, 2025, 8:45am UTC](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675/5 "2025-03-11T08:45:39Z")

</div>

Could you tell how you can view the produced HLSL script of Niagara?

---

<div class="post-metadata">

**Author:** ![Zij-J](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zij-j/32/1038590_2.png) [@Zij-J](https://forums.unrealengine.com/u/Zij-J)\
**Post date:** [July 3, 2025, 3:35am UTC](https://forums.unrealengine.com/t/niagara-data-channels-how-to-read-from-ndc-in-custom-hlsl-node/1917675/6 "2025-07-03T03:35:34Z")

</div>

Maybe produced HLSL script is this?  
I’m new to Unreal so I’m not sure.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/0/56005658d8c4ea28a1e59684e649cac41e7c73d9.jpeg)
