Table of Contents

Class ResourceResolver

Namespace
Stride.Rendering
Assembly
Stride.Rendering.dll

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 RenderDrawContext

RenderDrawContext 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 Texture

The depthStencil texture originally used for render target

readOnlyCached Texture

The 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 Texture

The 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 Texture

The 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 Texture

The 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