Method ToTexture
ToTexture(TensorFloat, int, int, int, bool)
Converts the data in a tensor to a render texture. Sentis only writes batch == 0 to the render texture.
If the width and height of the render texture don't match the width and height of the tensor, Sentis applies linear resampling.
Declaration
public static RenderTexture ToTexture(TensorFloat tensor, int width = -1, int height = -1, int channels = -1, bool broadcastChannels = false)
Parameters
Type | Name | Description |
---|---|---|
TensorFloat | tensor | The input tensor. |
int | width | The width of the output render texture. If the value is -1, Sentis uses the tensor to infer the width. |
int | height | The height of the output render texture. If the value is -1, Sentis uses the tensor to infer the height. |
int | channels | The numbers of channels of the output render texture. If the value is -1, Sentis uses the tensor to infer the number of channels. |
bool | broadcastChannels | When the value is |
Returns
Type | Description |
---|---|
RenderTexture | The created render texture. |
ToTexture(CommandBuffer, TensorFloat, int, int, int, bool)
Appends the convertion of the data in a tensor to a render texture to a CommandBuffer. Sentis only writes batch == 0 to the render texture.
If the width and height of the render texture don't match the width and height of the tensor, Sentis applies linear resampling.
Declaration
public static RenderTexture ToTexture(this CommandBuffer cb, TensorFloat tensor, int width = -1, int height = -1, int channels = -1, bool broadcastChannels = false)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cb | The CommandBuffer buffer to append graphics command to. |
TensorFloat | tensor | The input tensor. |
int | width | The width of the output render texture. If the value is -1, Sentis uses the tensor to infer the width. |
int | height | The height of the output render texture. If the value is -1, Sentis uses the tensor to infer the height. |
int | channels | The numbers of channels of the output render texture. If the value is -1, Sentis uses the tensor to infer the number of channels. |
bool | broadcastChannels | When the value is |
Returns
Type | Description |
---|---|
RenderTexture | The created render texture. |
ToTexture(TensorFloat, TextureTransform)
Converts the data in a tensor to a render texture. Sentis only writes batch == 0 to the render texture.
If the width and height of the output tensor don't match the width and height of the texture, Sentis applies linear resampling.
Declaration
public static RenderTexture ToTexture(TensorFloat tensor, TextureTransform transform)
Parameters
Type | Name | Description |
---|---|---|
TensorFloat | tensor | The input tensor. |
TextureTransform | transform | The optional settings for the conversion. Refer to TextureTransform for more information. |
Returns
Type | Description |
---|---|
RenderTexture | The created render texture. |
ToTexture(CommandBuffer, TensorFloat, TextureTransform)
Appends the conversion of the data in a tensor to a render texture in a CommandBuffer. Sentis only writes batch == 0 to the render texture.
If the width and height of the output tensor don't match the width and height of the texture, Sentis applies linear resampling.
Declaration
public static RenderTexture ToTexture(this CommandBuffer cb, TensorFloat tensor, TextureTransform transform)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cb | The CommandBuffer buffer to append graphics command to. |
TensorFloat | tensor | The input tensor. |
TextureTransform | transform | The optional settings for the conversion. Refer to TextureTransform for more information. |
Returns
Type | Description |
---|---|
RenderTexture | The created render texture. |