Class DistanceFieldConventions
Contains constants and special names that are expected to be used in compatible shaders and assets.
- Inheritance
-
Distance
Field Conventions
- Inherited Members
Fields
PerspectiveAwarePixelRangeKeyword
Field Value
PixelRangeBoneName
Name of the bone that stores the pixel range on its length, which is present on the Unity
Field Value
PixelRangeSourceKeywordPrefix
Common part of the shader keyword that specifies from where the shader should fetch the pixel range.
Field Value
Methods
GetDistanceFieldPropertyNames(Material)
List all property names of the given material that are expected to be distance fields.
Parameters
material
MaterialMaterial to query.
Returns
- string[]
GetDistanceFormat(TextureFormat)
Returns the likely distance field format this texture can store.
Parameters
format
TextureFormat Format to inspect
Returns
Remarks
Does not mean the texture data itself is a valid distance field!
GetKeywordSuffix(PixelRangeSource)
The string that joined to Pixel
Parameters
Returns
GetPixelRange(Sprite)
Gets the pixel range of this sprite, or null if it is not present.
Parameters
sprite
Sprite
Returns
GetPixelRangePlacement(Material)
Finds out how a material is set up to receive the distance field's pixel range.
Parameters
material
MaterialThe material to query.
Returns
- Distance
Field .PixelConventions Range ?Source A non-null value if the material appears to expect the pixel range in a known Distance
Field .Conventions. Pixel Range Source
GetPixelRangePropertyName(string)
Returns the property name for a given texture property's pixel range.
Parameters
fieldPropertyName
stringThe distance field texture property.
Returns
IsVertexData(PixelRangeSource)
Is this source informed through vertex data or material property?
Parameters
Returns
SetPixelRange(Sprite, int)
Sets the pixel range of this sprite.
If a bone named Pixel
Parameters
sprite
SpritepixelRange
int