Class RenderUtilities
A utility for common RGB sensor and channel rendering operations.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth
Assembly: Unity.Perception.Runtime.dll
Syntax
public static class RenderUtilities
Properties
shaderPassNames
An array of common shader pass names to enable.
Declaration
public static ShaderTagId[] shaderPassNames { get; }
Property Value
Type | Description |
---|---|
ShaderTagId[] |
Methods
CreateRendererListDesc(Camera, CullingResults, Material, int, LayerMask)
Creates a new RendererListDesc from the given parameters.
Declaration
public static RendererListDesc CreateRendererListDesc(Camera camera, CullingResults cullingResult, Material overrideMaterial, int overrideMaterialPassIndex, LayerMask layerMask)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | |
CullingResults | cullingResult | |
Material | overrideMaterial | |
int | overrideMaterialPassIndex | |
LayerMask | layerMask |
Returns
Type | Description |
---|---|
RendererListDesc |
FlipBackBuffer(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, Camera)
Vertically mirrors a back buffer RenderTexture if the current platform renders to its backbuffer upside down.
Declaration
public static void FlipBackBuffer(CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier dest, Camera camera)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | The command buffer in which to execute the flip. |
RenderTargetIdentifier | source | The source back buffer RenderTexture. |
RenderTargetIdentifier | dest | The destination RenderTexture with the flipped back buffer output. |
Camera | camera | The camera that rendered the back buffer. |
LoadPrewarmedShader(string)
Loads and prewarms the given shader.
Declaration
public static Shader LoadPrewarmedShader(string shaderPath)
Parameters
Type | Name | Description |
---|---|---|
string | shaderPath | The resources path of the shader to load. |
Returns
Type | Description |
---|---|
Shader | The loaded and prewarmed shader. |
ShouldFlipColorY(Camera, bool)
Check if for the given rendering pipeline there is a need to flip Y during readback.
Declaration
public static bool ShouldFlipColorY(Camera camera, bool usePassedInRenderTargetId)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | Camera from which the readback is being performed. |
bool | usePassedInRenderTargetId | When we are using a passed in RenderTexture id, then we don't need to flip. |
Returns
Type | Description |
---|---|
bool | A boolean indicating if the flip is required. |