ResourceResolver Class
Namespace: Stride.RenderingAssembly: 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
| 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 |
|
| 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 |
|
Constructors
ResourceResolver(RenderDrawContext)
Constructor
public ResourceResolver(RenderDrawContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderDrawContext | context | 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
| 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 |
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 |