Interface IRasterRenderGraphBuilder
A builder for a raster render pass. AddRasterRenderPass<PassData>(string, out PassData)
Inherited Members
Namespace: UnityEngine.Rendering.RenderGraphModule
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
[MovedFrom(true, "UnityEngine.Experimental.Rendering.RenderGraphModule", "UnityEngine.Rendering.RenderGraphModule", null)]
public interface IRasterRenderGraphBuilder : IRenderAttachmentRenderGraphBuilder, IBaseRenderGraphBuilder, IDisposable
Methods
SetExtendedFeatureFlags(ExtendedFeatureFlags)
Enables the configuration of extended pass properties that may allow platform-specific optimizations.
Declaration
void SetExtendedFeatureFlags(ExtendedFeatureFlags extendedFeatureFlags)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFeatureFlags | extendedFeatureFlags | Specifies additional pass properties that may enable optimizations on certain platforms. |
SetInputAttachment(TextureHandle, int, AccessFlags)
Use the texture as an input attachment.
This informs the graph that any shaders in pass will only read from this texture at the current fragment position using the LOAD_FRAMEBUFFER_INPUT(idx)/LOAD_FRAMEBUFFER_INPUT_MS(idx,sampleIdx) macros. The index passed to LOAD_FRAMEBUFFER_INPUT needs to match the index passed to SetInputAttachment for this texture.
Declaration
void SetInputAttachment(TextureHandle tex, int index, AccessFlags flags = AccessFlags.Read)
Parameters
Type | Name | Description |
---|---|---|
TextureHandle | tex | Texture to use during this pass. |
int | index | Index the shader will use to access this texture. |
AccessFlags | flags | How this pass will access the texture. Default value is set to AccessFlag.Read. Writing is currently not supported on any platform. |
Remarks
This API is not universally supported across all platforms. In particular, using input attachments in combination with MSAA may be unsupported on certain targets.
To ensure compatibility, use RenderGraphUtils.IsFramebufferFetchSupportedOnCurrentPlatform
to verify support at runtime, as platform capabilities may vary.
SetInputAttachment(TextureHandle, int, AccessFlags, int, int)
Use the texture as an input attachment.
This informs the graph that any shaders in pass will only read from this texture at the current fragment position using the LOAD_FRAMEBUFFER_INPUT(idx)/LOAD_FRAMEBUFFER_INPUT_MS(idx,sampleIdx) macros. The index passed to LOAD_FRAMEBUFFER_INPUT needs to match the index passed to SetInputAttachment for this texture.
Declaration
void SetInputAttachment(TextureHandle tex, int index, AccessFlags flags, int mipLevel, int depthSlice)
Parameters
Type | Name | Description |
---|---|---|
TextureHandle | tex | Texture to use during this pass. |
int | index | Index the shader will use to access this texture. |
AccessFlags | flags | How this pass will access the texture. Writing is currently not supported on any platform. |
int | mipLevel | Selects which mip map to used. |
int | depthSlice | Used to index into a texture array. Use -1 to use bind all slices. |
Remarks
Using same texture handle with different depth slices at different rendertarget indices is not supported.
SetRenderFunc<PassData>(BaseRenderFunc<PassData, RasterGraphContext>)
Specify the render function to use for this pass. A call to this is mandatory for the pass to be valid.
Declaration
void SetRenderFunc<PassData>(BaseRenderFunc<PassData, RasterGraphContext> renderFunc) where PassData : class, new()
Parameters
Type | Name | Description |
---|---|---|
BaseRenderFunc<PassData, RasterGraphContext> | renderFunc | Render function for the pass. |
Type Parameters
Name | Description |
---|---|
PassData | The Type of the class that provides data to the Render Pass. |
SetShadingRateCombiner(ShadingRateCombinerStage, ShadingRateCombiner)
Set shading rate combiner.
Declaration
void SetShadingRateCombiner(ShadingRateCombinerStage stage, ShadingRateCombiner combiner)
Parameters
Type | Name | Description |
---|---|---|
ShadingRateCombinerStage | stage | Shading rate combiner stage to apply combiner to. |
ShadingRateCombiner | combiner | Shading rate combiner to set. |
SetShadingRateFragmentSize(ShadingRateFragmentSize)
Set shading rate fragment size.
Declaration
void SetShadingRateFragmentSize(ShadingRateFragmentSize shadingRateFragmentSize)
Parameters
Type | Name | Description |
---|---|---|
ShadingRateFragmentSize | shadingRateFragmentSize | Shading rate fragment size to set. |
SetShadingRateImageAttachment(in TextureHandle)
Enables Variable Rate Shading (VRS) on the current rasterization pass. Rasterization will use the texture to determine the rate of fragment shader invocation.
Declaration
void SetShadingRateImageAttachment(in TextureHandle tex)
Parameters
Type | Name | Description |
---|---|---|
TextureHandle | tex | Shading rate image (SRI) Texture to use during this pass. |