Class VertexNormalsChannel
A CameraChannel<T> that outputs the vertex normal of the surface captured by each pixel in the CameraSensor's output texture.
Implements
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Sensors.Channels
Assembly: Unity.Perception.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public class VertexNormalsChannel : CameraChannel<float4>, IPostProcessChannel
Properties
clearColor
The color to use when clearing the output texture of the channel.
Declaration
public override Color clearColor { get; }
Property Value
| Type | Description |
|---|---|
| Color |
Overrides
preprocessTexture
The combine channel output texture before post processing.
Declaration
public RenderTexture preprocessTexture { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderTexture |
Methods
CreateOutputTexture(int, int)
Initializes and returns a new RenderTexture that will contain the output of the channel.
Declaration
public override RenderTexture CreateOutputTexture(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The requested width of the output texture in pixels. |
| int | height | The requested height of the output texture in pixels. |
Returns
| Type | Description |
|---|---|
| RenderTexture | The newly created channel output texture. |
Overrides
CreatePreprocessTexture(int, int)
Creates a channel texture meant for eventual post-processing.
Declaration
public RenderTexture CreatePreprocessTexture(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of the texture. |
| int | height | The height of the texture. |
Returns
| Type | Description |
|---|---|
| RenderTexture |
Execute(CameraChannelInputs, RenderTexture)
Perform the graphics operations necessary to render the output of the channel.
Declaration
public override void Execute(CameraChannelInputs inputs, RenderTexture renderTarget)
Parameters
| Type | Name | Description |
|---|---|---|
| CameraChannelInputs | inputs | A variety of input parameters that can be used to provide context to a channel to facilitate rendering. |
| RenderTexture | renderTarget | The render target to write the channel output to. |
Overrides
PostProcessChannelOutput(ScriptableRenderContext, CommandBuffer, RenderTexture, RenderTexture)
Perform post processing steps on a channel's preprocessTexture.
Declaration
public void PostProcessChannelOutput(ScriptableRenderContext ctx, CommandBuffer cmd, RenderTexture input, RenderTexture output)
Parameters
| Type | Name | Description |
|---|---|---|
| ScriptableRenderContext | ctx | The current frame's ScriptableRenderContext |
| CommandBuffer | cmd | The commandBuffer to enqueue post processing commands into. |
| RenderTexture | input | The channel's preprocess texture. |
| RenderTexture | output | The channel's outputTexture. |