Struct TextureTransform
Represents settings for converting between textures and tensors.
Create an instance of TextureTransform
using the constructor, then use the TextureTransform
object as a parameter in TextureConverter
methods.
For example: TextureTransform settings = new TextureTransform().SetDimensions(256, 256, 4).SetTensorLayout(TensorLayout.NHWC);
Inherited Members
Namespace: Unity.Sentis
Assembly: solution.dll
Syntax
public struct TextureTransform
Methods
Name | Description |
---|---|
SetBroadcastChannels(bool) | Sets the default behaviour when the output texture has more channels than the input tensor. When When |
SetChannelColorMask(bool, bool, bool, bool, Color) | Sets which channels in the output texture ignore input tensor values and write a specific The method returns a |
SetChannelColorMask(Channel, bool, float) | Sets a specific texture channel, for example |
SetChannelSwizzle(int, int, int, int) | Sets which channels in the tensor map to which RGBA channels in the texture, using four channel position values. A color mask for tensor to texture conversions might override this setting. |
SetChannelSwizzle(Channel, int) | Sets a specific texture channel, for example A color mask for tensor to texture conversions might override this setting. |
SetChannelSwizzle(ChannelSwizzle) | Sets which channels in the tensor map to which RGBA channels in the texture, using a A color mask for tensor to texture conversions might override this setting. |
SetCoordOrigin(CoordOrigin) | Sets the position of the origin (0, 0) in the tensor. |
SetDimensions(int, int, int) | Sets the dimensions of the output texture or tensor. The default value is -1, which means Sentis infers the dimensions from the input texture or tensor. If the width and height of the input don't match the width and height of the output, Sentis applies linear resampling. If you use The method returns a |
SetTensorLayout(int, int, int, int) | Sets the layout of the input tensor with four int values. |
SetTensorLayout(TensorLayout) | Sets the layout of the input tensor with a |