Method RenderFromCamera
RenderFromCamera(in CustomPassContext, Camera, LayerMask, RenderQueueType, Material, int, RenderStateBlock)
Render a list of objects from another camera point of view.
Declaration
public static void RenderFromCamera(in CustomPassContext ctx, Camera view, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, Material overrideMaterial = null, int overrideMaterialIndex = 0, RenderStateBlock overrideRenderState = default)
Parameters
Type | Name | Description |
---|---|---|
CustomPassContext | ctx | Custom Pass Context. |
Camera | view | The camera from where you want the objects to be rendered. |
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. |
RenderFromCamera(in CustomPassContext, Camera, RenderTexture, ClearFlag, LayerMask, RenderQueueType, Material, int, RenderStateBlock)
Render a list of objects from another camera point of view.
Declaration
public static void RenderFromCamera(in CustomPassContext ctx, Camera view, RenderTexture targetRenderTexture, ClearFlag clearFlag, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, Material overrideMaterial = null, int overrideMaterialIndex = 0, RenderStateBlock overrideRenderState = default)
Parameters
Type | Name | Description |
---|---|---|
CustomPassContext | ctx | Custom Pass Context. |
Camera | view | The camera from where you want the objects to be rendered. |
RenderTexture | targetRenderTexture | The render target that will be bound before rendering the objects. |
ClearFlag | clearFlag | The type of clear to do before binding the render targets. |
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. |
RenderFromCamera(in CustomPassContext, Camera, RTHandle, RTHandle, ClearFlag, LayerMask, RenderQueueType, Material, int, RenderStateBlock)
Render a list of objects from another camera point of view.
Declaration
public static void RenderFromCamera(in CustomPassContext ctx, Camera view, RTHandle targetColor, RTHandle targetDepth, ClearFlag clearFlag, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, Material overrideMaterial = null, int overrideMaterialIndex = 0, RenderStateBlock overrideRenderState = default)
Parameters
Type | Name | Description |
---|---|---|
CustomPassContext | ctx | Custom Pass Context. |
Camera | view | The camera from where you want the objects to be rendered. |
RTHandle | targetColor | The render target that will be bound to the color buffer before rendering |
RTHandle | targetDepth | The render target that will be bound to the depth buffer before rendering |
ClearFlag | clearFlag | The type of clear to do before binding the render targets. |
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. |