Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ResourceResolver Class

    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

    System.Object → ResourceResolver
    Derived from ResourceResolver:

    public class ResourceResolver
    Name Description
    Constructors
    ResourceResolver(RenderDrawContext)

    Constructor

    Methods
    GetDepthStencilAsRenderTarget(Texture, Texture)

    Returns a 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

    ReleaseDepthStenctilAsShaderResource(Texture)

    Frees previously acquired SRV texture. Should be called when the view is no longer needed

    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

    | Improve this Doc View Source

    Constructors


    ResourceResolver(RenderDrawContext)

    Constructor

    public ResourceResolver(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    RenderDrawContext to which this resolver belongs

    | Improve this Doc View Source

    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
    Type Name Description
    Texture texture

    The depthStencil texture originally used for render target

    Texture readOnlyCached

    The cached view for the texture resource

    Returns
    Type Description
    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
    Type Name Description
    Texture texture

    The depthStencil texture originally used for render target

    Returns
    Type Description
    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
    Type Name Description
    Texture depthAsSR

    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
    Type Name Description
    Texture texture

    The depthStencil texture originally used for render target

    Returns
    Type Description
    Texture

    The texture view which should be used as DepthStencil render target while SRV is also used


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation