Enum ShaderType
- All Implemented Interfaces:
Comparable<ShaderType>
The value type of a
ShaderNode. Every shading language the backends
target has these four, so a graph typed with them prints the same way on
all of them.-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of float components, 1 to 4.static ShaderTypeofComponents(int n) Returns the type with the given number of components.static ShaderTypeReturns the enum constant of this type with the specified name.static ShaderType[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
FLOAT
One float. -
VEC2
Two floats. -
VEC3
Three floats: a position, a direction or a colour. -
VEC4
Four floats: a colour with alpha, or a sampled texel.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getComponents
public int getComponents()Returns the number of float components, 1 to 4.
Returns
the component count
-
ofComponents
Returns the type with the given number of components.
Parameters
n: 1 to 4
Returns
the matching type
-