# Calling GetGBufferData inside a custom node in a post-process material crashes the editor 

**URL:** <https://forums.unrealengine.com/t/calling-getgbufferdata-inside-a-custom-node-in-a-post-process-material-crashes-the-editor/2687746>\
**Category:** Asset Creation\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [November 24, 2025, 9:19am UTC](https://forums.unrealengine.com/t/calling-getgbufferdata-inside-a-custom-node-in-a-post-process-material-crashes-the-editor/2687746 "2025-11-24T09:19:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 24, 2025, 9:19am UTC](https://forums.unrealengine.com/t/calling-getgbufferdata-inside-a-custom-node-in-a-post-process-material-crashes-the-editor/2687746/1 "2025-11-24T09:19:24Z")

</div>

Hi there,

I am trying to access some gbuffer data in a post process material. In particular i would like to access PerObjectGBufferData which is stored in GBufferA.a. We would like to use these two bits for some custom effects (overriding the default behaviour: cast contact shadow + capsule representation). To do that I used GetGBufferData(UV).PerObjectGBufferData inside a custom node in a post process material. Unfortunately, as soon as I compile the material the engine crashes with the error reported below.

Even if I try something like GetGBufferData(UV).WorldNormal, I still get the same error despite the fact that SceenTextureLookup basically does the same thing (GetScreenSpaceData -\> GetGBufferData).

So the question is: how can I access PerObjectGBufferData in a post process material?

Thanks a lot

```auto
Assertion failed: false [File:D:\build\++UE5\Sync\Engine\Source\Runtime\RHICore\Private\RHICoreShader.cpp] [Line: 60] 
Shader attempted to bind uniform buffer 'FOpaqueBasePassUniformParameters' at slot [Name: SceneTextures, Slot: 9] with hash '158338568', but the shader expected 'LumenFrontLayerTranslucencyGBufferPass' with hash '441254321'.

```

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 24, 2025, 9:19am UTC](https://forums.unrealengine.com/t/calling-getgbufferdata-inside-a-custom-node-in-a-post-process-material-crashes-the-editor/2687746/2 "2025-11-24T09:19:28Z")

</div>

**Steps to Reproduce**

- Open the attached project
- open `TestMap`
- Open `M_PP`
- Uncomment the code in the custom node
- Click apply
- Observe the crash

---

<div class="post-metadata">

**Author:** ![EnduringStephenK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enduringstephenk/32/1216749_2.png) [@EnduringStephenK](https://forums.unrealengine.com/u/EnduringStephenK)\
**Post date:** [November 24, 2025, 5:18pm UTC](https://forums.unrealengine.com/t/calling-getgbufferdata-inside-a-custom-node-in-a-post-process-material-crashes-the-editor/2687746/3 "2025-11-24T17:18:57Z")

</div>

Hello,

Thank you for reaching out.

I’ve been assigned this issue, and we will be looking into this use of Custom Material Expressions for you.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 26, 2025, 4:32pm UTC](https://forums.unrealengine.com/t/calling-getgbufferdata-inside-a-custom-node-in-a-post-process-material-crashes-the-editor/2687746/4 "2025-11-26T16:32:57Z")

</div>

I think i found how to make it work. Adding this #if before calling getgbufferdata fixes it

#if !SCENE\_TEXTURES\_DISABLED && !SUBSTRATE\_ENABLED && PIXELSHADER && !RAYCALLABLESHADER

---

<div class="post-metadata">

**Author:** ![EnduringStephenK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enduringstephenk/32/1216749_2.png) [@EnduringStephenK](https://forums.unrealengine.com/u/EnduringStephenK)\
**Post date:** [November 26, 2025, 10:56pm UTC](https://forums.unrealengine.com/t/calling-getgbufferdata-inside-a-custom-node-in-a-post-process-material-crashes-the-editor/2687746/5 "2025-11-26T22:56:54Z")

</div>

Hello,

“SceneTextureLookup(…)” handles various permutation cases, and not all of those use “GetGBufferData(…)”, because not all of the permutations use the GBuffer bindings.

If you want to use “GetGBufferData(…)” directly, you need to handle the same permutations. Here is some sample code showing that:

```auto
#if SHADING_PATH_DEFERRED
#if POST_PROCESS_MATERIAL
#if !SCENE_TEXTURES_DISABLED
#if !SUBSTRATE_ENABLED
 
float2 UV = GetDefaultSceneTextureUV(Parameters, PPI_WorldNormal);
FGBufferData GBData = GetGBufferData(UV);
return GBData.WorldNormal;
 
#endif //!SUBSTRATE_ENABLED
#endif //!SCENE_TEXTURES_DISABLED
#endif //POST_PROCESS_MATERIAL
#endif //SHADING_PATH_DEFERRED
 
return float3(0,0,0);

```

Keep in mind that Custom Material Expressions allow injection of any HLSL into a Material’s shader, even if that can lead to errors or crashes.

Please let us know if this helps.
