# DecodeSceneColorForMaterialNode replaced by Depth in SpiralBlur-SceneTexture

**URL:** <https://forums.unrealengine.com/t/decodescenecolorformaterialnode-replaced-by-depth-in-spiralblur-scenetexture/456030>\
**Category:** Rendering\
**Tags:** unreal-engine, blur, Shaders, question\
**Created:** [September 26, 2019, 1:44pm UTC](https://forums.unrealengine.com/t/decodescenecolorformaterialnode-replaced-by-depth-in-spiralblur-scenetexture/456030 "2019-09-26T13:44:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Med3d2dfx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Med3d2dfx](https://forums.unrealengine.com/u/Med3d2dfx)\
**Post date:** [September 26, 2019, 1:44pm UTC](https://forums.unrealengine.com/t/decodescenecolorformaterialnode-replaced-by-depth-in-spiralblur-scenetexture/456030/1 "2019-09-26T13:44:25Z")

</div>

I want to replaced the scene color by depth in spiral blur scene texture, custom expression. The part of the code that i needs to replaced is  
DecodeSceneColorForMaterialNode(NewUV);  
I understand that is a built in function that show the scene color,  
but a function like “DecodeDepthForMaterialNode(NewUV);” exist? Or it’s completly an other way to do this?  
I want to do a function like a blur on a DepthFade node.

Thank you!

---

<div class="post-metadata">

**Author:** ![Andrej730](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/andrej730/32/1194692_2.png) [@Andrej730](https://forums.unrealengine.com/u/Andrej730)\
**Post date:** [February 1, 2025, 5:30pm UTC](https://forums.unrealengine.com/t/decodescenecolorformaterialnode-replaced-by-depth-in-spiralblur-scenetexture/456030/2 "2025-02-01T17:30:28Z")

</div>

Very late to the party but the function is `CalcSceneDepth(NewUV)`.

As a general hint on finding hlsl methods for custom node - you can connect to your material graph the node you’re looking for (in that case it’s “Scene Depth”), compile material and then open Window → Shader Code → HLSL → Copy and after some investigation it’s possible to find the internal hlsl code for any material graph node.
