StandardShaderUtility Class

Definition

Graphics Tools standard shader utility class with commonly used constants, types and convenience methods.

public static class StandardShaderUtility
type StandardShaderUtility = class
Public Class StandardShaderUtility
Inheritance
StandardShaderUtility

Fields

GraphicsToolsStandardCanvasShaderName

The string name of the Standard Canvas shader which can be used to identify a shader or for shader lookups.

GraphicsToolsStandardShaderName

The string name of the Standard shader which can be used to identify a shader or for shader lookups.

GraphicsToolsTextMeshProShaderName

The string name of the Graphics Tools Text Mesh Pro shader which can be used to identify a shader or for shader lookups.

Properties

GraphicsToolsStandardCanvasShader

Returns an instance of the Graphics Tools/Standard shader.

GraphicsToolsStandardShader

Returns an instance of the Graphics Tools/Standard shader.

GraphicsToolsTextMeshProShader

Returns an instance of the Graphics Tools/Text Mesh Pro shader.

Methods

AutofillFourPointGradient(Color, Color, Color, Color, Color, Color)

Given a source color produces a visually pleasing" gradient by shifting the source color in HSV space.

ColorShiftHSV(Color, Single, Single, Single)

Shifts a source color in HSV color space.

IsGraphicsToolsStandardShader(Shader)

Checks if a shader is the Graphics Tools/Standard or Standard Canvas shader.

IsGraphicsToolsTextMeshProShader(Shader)

Checks if a shader is the Graphics Tools/Text Mesh Pro shader.

IsUsingGraphicsToolsStandardShader(Material)

Checks if a material is using the Graphics Tools/Standard or Standard Canvas shader.

IsUsingGraphicsToolsTextMeshProShader(Material)

Checks if a material is using the Graphics Tools/Text Mesh Pro shader.

TryParseCSSGradient(String, Color[], Single[], Single)

Attempts to parse a CSS gradient (https://developer.mozilla.org/en-US/docs/Web/CSS/gradient) into an array of colors and times. Note, only linear gradients are supported at the moment. And, not all CSS gradient features are supported. An example input sting is: background: background: linear-gradient(90deg, #0380FD 0%, #406FC8 19.05%, #2B398F 49.48%, #FF77C1 100%);

Applies to