Method DrawRenderers
DrawRenderers(in CustomPassContext, LayerMask, RenderQueueType, Material, int, RenderStateBlock, SortingCriteria)
Simpler version of ScriptableRenderContext.DrawRenderers to draw HDRP materials.
Declaration
public static void DrawRenderers(in CustomPassContext ctx, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, Material overrideMaterial = null, int overrideMaterialIndex = 0, RenderStateBlock overrideRenderState = default, SortingCriteria sorting = SortingCriteria.SortingLayer | SortingCriteria.RenderQueue | SortingCriteria.OptimizeStateChanges | SortingCriteria.CanvasOrder)
Parameters
Type | Name | Description |
---|---|---|
CustomPassContext | ctx | Custom Pass Context. |
LayerMask | layerMask | LayerMask to filter the objects to render. |
CustomPass.RenderQueueType | renderQueueFilter | Render Queue to filter the type of objects you want to render. |
Material | overrideMaterial | Optional material that will be used to render the objects. |
int | overrideMaterialIndex | Pass index to use for the override material. |
RenderStateBlock | overrideRenderState | The render states to override when rendering the objects. |
SortingCriteria | sorting | How the objects are sorted before being rendered. |
DrawRenderers(in CustomPassContext, ShaderTagId[], LayerMask, RenderQueueType, Material, int, RenderStateBlock, SortingCriteria)
Simpler version of ScriptableRenderContext.DrawRenderers to draw HDRP materials.
Declaration
public static void DrawRenderers(in CustomPassContext ctx, ShaderTagId[] shaderTags, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, Material overrideMaterial = null, int overrideMaterialIndex = 0, RenderStateBlock overrideRenderState = default, SortingCriteria sorting = SortingCriteria.SortingLayer | SortingCriteria.RenderQueue | SortingCriteria.OptimizeStateChanges | SortingCriteria.CanvasOrder)
Parameters
Type | Name | Description |
---|---|---|
CustomPassContext | ctx | Custom Pass Context. |
ShaderTagId[] | shaderTags | List of shader tags to use when rendering the objects. This acts as a filter to select which objects to render and as selector to know which pass to render. |
LayerMask | layerMask | LayerMask to filter the objects to render. |
CustomPass.RenderQueueType | renderQueueFilter | Render Queue to filter the type of objects you want to render. |
Material | overrideMaterial | Optional material that will be used to render the objects. |
int | overrideMaterialIndex | Pass index to use for the override material. |
RenderStateBlock | overrideRenderState | The render states to override when rendering the objects. |
SortingCriteria | sorting | How the objects are sorted before being rendered. |