Announcement

Collapse
No announcement yet.

Any way to access the SceneTexturesStruct from inside a PostProcess shader?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Any way to access the SceneTexturesStruct from inside a PostProcess shader?

    I'm currently modifying the engine source to make some additions/alterations to the renderer. One thing I'd like to be able to do is alter certain aspects of the Post Processing part of the rendering. Specifically, I'm trying to figure out if I can access the SceneTexturesStruct (containing GBuffer data etc.) during one of the Post Processing global shaders.

    For example, I'm trying to include a line like this inside PostProcessTonemap.usf:

    Code:
    float3 Mask = Texture2DSample(SceneTexturesStruct.SceneDepthTexture, SceneTexturesStruct.SceneDepthTextureSampler, SceneUV).rgb;
    However, when I run this, I get the following error:

    Code:
    Fatal error: [File:C:\Users\X\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11Commands.cpp] [Line: 1508] 
    Shader expected a uniform buffer of struct type SceneTexturesStruct at slot 2 but got null instead.  Rendering code needs to set a valid uniform buffer for this slot.
    I'm in a bit over my head here, but it seems like the SceneTexturesStruct isn't available to this shader, so I'm wondering whether its actually possible to make it accessible? Or am I way off base here?!

    #2
    It's been awhile, but did you ever figure this out? I'm currently having the same issue and I'm trying to follow along how other FGlobalShaders do it.

    Thanks,

    Comment

    Working...
    X