# SceneTextureLookup hlsl function no longer works in substrate

**URL:** <https://forums.unrealengine.com/t/scenetexturelookup-hlsl-function-no-longer-works-in-substrate/1302873>\
**Category:** Rendering\
**Tags:** unreal-engine, Substrate, question\
**Created:** [September 19, 2023, 6:35am UTC](https://forums.unrealengine.com/t/scenetexturelookup-hlsl-function-no-longer-works-in-substrate/1302873 "2023-09-19T06:35:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liquos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Liquos](https://forums.unrealengine.com/u/Liquos)\
**Post date:** [September 19, 2023, 6:35am UTC](https://forums.unrealengine.com/t/scenetexturelookup-hlsl-function-no-longer-works-in-substrate/1302873/1 "2023-09-19T06:35:22Z")

</div>

Hello, I would like to make some custom post process materials using the Custom HLSL node, and I need to do multiple texture lookups.

Previously, I would use the SceneTextureLookup function in hlsl to do this, but it no longer works in substrate. Here is some example code that should just return the same image without any changes:

```auto
float2 UV = GetViewportUV(Parameters) - 0.5;

// Adjust the UV coordinates to fit within the valid range (assuming 14 as your texture ID)
float2 FinalUV = ClampSceneTextureUV(ViewportUVToSceneTextureUV(UV + 0.5, 14), 14);

// Perform a simple scene texture lookup using the final UVs
float3 OutputColor = SceneTextureLookup(FinalUV, 14, true);

return OutputColor;

```

What’s strange is if I example the HLSL code output of the shader, it DOES in fact use the SceneTextureLookup function when using nodes like “SceneTexture”.

---

<div class="post-metadata">

**Author:** ![Derjyn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/derjyn/32/931618_2.png) [@Derjyn](https://forums.unrealengine.com/u/Derjyn)\
**Post date:** [September 10, 2024, 4:49am UTC](https://forums.unrealengine.com/t/scenetexturelookup-hlsl-function-no-longer-works-in-substrate/1302873/2 "2024-09-10T04:49:13Z")

</div>

This right here is driving me mad. There was this obscure change, and we lost access to other things as well, and it’s horribly documented, and randomly answered with very personal fixes from others that don’t translate elsewhere.

I have a ton of HLSL that broke, and my heart hurts about it.

Yeah, I’m necro’ing this thread. All the other ones related to this should be as well, so we can get some solid insight on how to approach this.

Can’t get access to light data because “deferred” rendering (plenty of people have made plugins or otherwise augmented engine source to get at it, so this is a poor excuse), and simple texture lookups are an insane pain to use.

In case someone else wanders through on their searches for solutions, this is one bit that helped me along in some custom HLSL stuff:

> If you make a variable called “SceneTexture” in you custom node and connect the SceneTexture:PostProcessInput0 color output up to it, you then have access to SceneTextureLookup. I thought you’d only get the float4 value returned.

[_From Reddit_](https://www.reddit.com/r/unrealengine/comments/q172se/getting_postprocessinput_textures_as_input_to/)

---

<div class="post-metadata">

**Author:** ![cnfh78](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cnfh78](https://forums.unrealengine.com/u/cnfh78)\
**Post date:** [June 27, 2026, 1:05am UTC](https://forums.unrealengine.com/t/scenetexturelookup-hlsl-function-no-longer-works-in-substrate/1302873/3 "2026-06-27T01:05:29Z")

</div>

It seems like the custom shader node is really badly documented

---

<div class="post-metadata">

**Author:** ![William345454r3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@William345454r3](https://forums.unrealengine.com/u/William345454r3)\
**Post date:** [June 28, 2026, 4:55am UTC](https://forums.unrealengine.com/t/scenetexturelookup-hlsl-function-no-longer-works-in-substrate/1302873/4 "2026-06-28T04:55:33Z")

</div>

`Scene texture lookup` has not been removed, the custom hlsl node just does not get the helper code automatically in Substrate. A regular **scene texture** node forces Unreal to include it.

Try adding an unused SceneTexture node to the material, then call `SceneTextureLookup` in your HLSL. Also verify the texture ID`14` since those IDs can change between UE versions.
