Class PhotosensorToDepth
The role of this class is to interpret the data incoming from the photosensor into an depth texture. The internal shader does a simple conversion of the z axis value between [minRange, maxRange] -> [0.0, 1.0].
Inherited Members
Namespace: Mechatronics.SensorSDK
Syntax
public class PhotosensorToDepth : PhotosensorEncoder
Fields
_outputBuffer
An internal reference to the render texture used to output the result.
Declaration
protected RenderTexture _outputBuffer
Field Value
Type | Description |
---|---|
RenderTexture |
depth
Declaration
[Tooltip("Current state of the frame sampled.")]
[Field("Depth", PortDirection.Right, FieldExtra.Write)]
[SerializeField]
protected PortType<RenderTexture> depth
Field Value
Type | Description |
---|---|
PortType<RenderTexture> |
height
Declaration
[Tooltip("Vertical frame size.")]
[Field("FrameHeight", PortDirection.Left, FieldExtra.Read)]
[SerializeField]
protected PortType<uint> height
Field Value
Type | Description |
---|---|
PortType<UInt32> |
width
Declaration
[Tooltip("Horizontal frame size.")]
[Field("FrameWidth", PortDirection.Left, FieldExtra.Read)]
[SerializeField]
protected PortType<uint> width
Field Value
Type | Description |
---|---|
PortType<UInt32> |
Methods
Disable()
Disable the change event on the input render texture and release the graphic resources.
Declaration
public override void Disable()
Overrides
Enable(Scheduler.ClockState)
Enable the change event on the input render texture and initialize the compute shader.
Declaration
public override void Enable(Scheduler.ClockState clockState)
Parameters
Type | Name | Description |
---|---|---|
Scheduler.ClockState | clockState | The parameters of the waveform associated to this node |
Overrides
Transcode(CustomPassContext)
Add to the command buffer the Conversion of the photosensor sampling data into a depth buffer.
Declaration
protected override void Transcode(CustomPassContext ctx)
Parameters
Type | Name | Description |
---|---|---|
CustomPassContext | ctx | Custom pass context |