Class ResourceResolver
Resolves a render target from one render pass to be used as an input resource to another render pass
public class ResourceResolver
- Inheritance
-
ResourceResolver
Constructors
ResourceResolver(RenderDrawContext)
Constructor
public ResourceResolver(RenderDrawContext context)
Parameters
context
RenderDrawContextRenderDrawContext to which this resolver belongs
Methods
GetDepthStencilAsRenderTarget(Texture, Texture)
Returns a texture view which should be used as DepthStencil render target while SRV is also used
public Texture GetDepthStencilAsRenderTarget(Texture texture, Texture readOnlyCached)
Parameters
texture
TextureThe depthStencil texture originally used for render target
readOnlyCached
TextureThe cached view for the texture resource
Returns
- Texture
The texture view which should be used as DepthStencil render target while SRV is also used
GetDepthStenctilAsShaderResource(Texture)
Returns a texture view which should be used as DepthStencil Shader Resource View. Can be null
if not supported
public Texture GetDepthStenctilAsShaderResource(Texture texture)
Parameters
texture
TextureThe depthStencil texture originally used for render target
Returns
- Texture
The texture view which should be used as DepthStencil SRV. Can be
null
if not supported
ReleaseDepthStenctilAsShaderResource(Texture)
Frees previously acquired SRV texture. Should be called when the view is no longer needed
public void ReleaseDepthStenctilAsShaderResource(Texture depthAsSR)
Parameters
depthAsSR
TextureThe previously acquired SRV texture
ResolveDepthStencil(Texture)
Resolves the depth render target so it can be used as a shader resource view. Should only be called once per frame and acquired with GetDepthStenctilAsShaderResource(Texture) after that
public Texture ResolveDepthStencil(Texture texture)
Parameters
texture
TextureThe depthStencil texture originally used for render target
Returns
- Texture
The texture view which should be used as DepthStencil render target while SRV is also used