Class RenderTextureTranscoder
The role of this class is to share everything common to all transcoder that take a RenderTexture as input to produce a RenderTexture as output.
One must understand when the gamma correction should be applied.The image processing pipeline works with linear color by default.
The only place where the gamma correction is automatically applied is in the tone mapping node. If one output a render texture, he must
consider to create an output RenderTexture with a sRGB support. (see color space parameter on PrepareOutputBuffer())
Inherited Members
Namespace: Mechatronics.SensorSDK
Syntax
public abstract class RenderTextureTranscoder : Transcoder
Fields
_outputBuffer
Internal reference to the RenderTexture written on the port outRenderTexture.
Declaration
protected RenderTexture _outputBuffer
Field Value
Type | Description |
---|---|
RenderTexture |
inRenderTexture
Declaration
[Tooltip("Input render texture to apply a transcoding process on.")]
[Field("InRenderTexture", PortDirection.Left, FieldExtra.Read | FieldExtra.ChangeEvent)]
[SerializeField]
protected PortType<RenderTexture> inRenderTexture
Field Value
Type | Description |
---|---|
PortType<RenderTexture> |
outRenderTexture
Declaration
[Tooltip("Output render texture with the result of the transcoding process.")]
[Field("OutRenderTexture", PortDirection.Right, FieldExtra.Write)]
[SerializeField]
protected PortType<RenderTexture> outRenderTexture
Field Value
Type | Description |
---|---|
PortType<RenderTexture> |
Methods
PrepareOutputBuffer(Int32, Int32, RenderTextureFormat, RenderTextureReadWrite)
Create or resize the compute buffer used to store transcoded data.
Declaration
protected virtual void PrepareOutputBuffer(int frameWidth, int frameHeight, RenderTextureFormat format, RenderTextureReadWrite colorSpace = RenderTextureReadWrite.Linear)
Parameters
Type | Name | Description |
---|---|---|
Int32 | frameWidth | Horizontal size in pixel. |
Int32 | frameHeight | Horizontal size in pixel. |
RenderTextureFormat | format | Color encoding format. |
RenderTextureReadWrite | colorSpace | Linear color space or gamma space. |
Release()
Release graphics resources
Declaration
protected override void Release()