Search Unity

How to access the depth stencil texture?

Discussion in 'General Graphics' started by seb_krueger, Apr 30, 2019.

  1. seb_krueger

    seb_krueger

    Joined:
    Jan 4, 2019
    Posts:
    17
    Hi,

    I'm working on a native rendering pluing. I want you the current depth stencil texture in my plugin as shader source.
    Extracting it from the immediate context works fine. In the Editor, I also can use the texture as shader input.
    But with a build executeable, the D3D11_BIND_FLAG of the same texture is missing the D3D11_BIND_SHADER_RESOURCE flag.

    Is there a better way to get access to depth stencil texture during runtime?
    I know there is an API for render-to-texture, but nothing there for on-screen-rendering.

    Thanks!