This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
Intoduction
The StaticTexture2D Component stores a reference to a static asset representing a 2D Texture.
Usage
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
URL
|
Uri | The Asset URI that references the raw texture data |
FilterMode
|
TextureFilterMode | The type of filtering to use for this texture. |
AnisotropicLevel
|
Int | The level of anisotropy to use when TextureFilterMode is set to Anisotropic
|
Uncompressed
|
Bool | Do not use texture compression |
DirectLoad
|
Bool | |
ForceExactVariant
|
Bool | |
PreferredFormat
|
Nullable`1<TextureCompression> | |
PreferredProfile
|
Nullable`1<ColorProfile> | |
MipMapBias
|
Float | Offset to the MipMap calculation. |
IsNormalMap
|
Bool | This texture should be interpreted as a Normal Map |
WrapModeU
|
TextureWrapMode | How to handle U values outside of the range [0.0,1.0] |
WrapModeV
|
TextureWrapMode | How to handle V values outisde of the range [0.0,1.0] |
PowerOfTwoAlignThreshold
|
Float | |
CrunchCompressed
|
Bool | |
MaxSize
|
Nullable`1<Int> | |
MipMaps
|
Bool | |
KeepOriginalMipMaps
|
Bool | |
MipMapFilter
|
Filtering | |
Readable
|
Bool |
Behavior
By default Filter
is set to Bilinear Filtering, however Anisotropic Filtering results in a much better appearance at very steep angles, and only has a very minor performance impact. If visual fidelity of your texture is a concern, you should set Filter
to Anisotropic, and AnisotropicLevel
to 4 or 8.
Special Functions
Any of the operations listed below will generate a new static texture asset, and anything referring to this StaticTexture2D component will be updated with the new texture. The existing asset is deleted from the servers if no other items refer to it.
Custom UI Elements | |
---|---|
Name | Description |
Invert RGB | Inverts the colors of the texture |
Invert R | Same as above, but only effects the red channel of the texture |
Invert G | Same as above, but only effects the green channel of the texture |
Invert B | Same as above, but only effects the blue channel of the texture |
Invert A | Same as above, but only effects the alpha channel of the texture |
Color to Alpha (White) | Converts all pure white colors in the image to alpha |
Color to Alpha (Black) | Converts all pure black colors in the image to alpha |
Alpha from intensity | |
Alpha to mask | Creates a black and white mask texture from an alpha image |
Remove Alpha | Forces the entire image to full opacity on the alpha channel |
Convert to grayscale (average) | Converts the image to grayscale based on the average of the red, green and blue channel. |
Swap R and G | Swaps the red and green channels on the image |
Swap R and B | Swaps the red and blue channels on the image |
Swap G and B | Swaps the green and blue channels on the image |
Shift Hue | Adjusts the hue of the image by the increment specified in the Input box |
Adjust Gamma | Adjusts the gamma the image by the increment specified in the Input box |
Resize | Resizes the image such that the longest size of the image is equal to the size specified in the input box. |
Flip Horizontal | Flips the image horizontally |
Flip Vertical | Flips the image vertical |
Rotate 90° CW | Rotates the image by 90° clockwise |
Rotate 90° CCW | Rotates the image by 90° counterclockwise |
Rotate 180° | Rotates the image by 180° |
Make square | Stretches the image such that both sides are equal to the longest side |
To nearest power of two | Stretches the image on each axis individually, to the next largest power of two. |
Diagnostic: Invalid floats | Highlights any pixels that are out of range |
Diagnostic: Generate Bitmap Metadata | Spawns a Texture Metadata window displaying the asset's texture metadata as a string |