Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

How to access the depth stencil texture?

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

  1. seb_krueger


    Jan 4, 2019

    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.