Scripting API
Scripting API
ShaderValue
Record in Abyss.Core, from Abyss.Core.
One value a shader takes, as its WGSL declares it.
public record ShaderValueConstructors
ShaderValue
public ShaderValue(string Name, int Offset, FieldKind Kind, int Count, bool IsColor)One value a shader takes, as its WGSL declares it.
Parameters
Name: What the shader calls it, and what a script sets it by.Offset: Bytes from the start of the shader's values.Kind: What each of its numbers is: a 32-bit float or integer.Count: How many numbers: one, a vector's two to four, or a 4×4 matrix's sixteen.IsColor: Whether it is a color — a vector of three or four floats whose name sayscolororcolor— which starts white rather than black, and which an editor shows as a swatch.
Properties
Name
public string Name { get; init; }What the shader calls it, and what a script sets it by.
Offset
public int Offset { get; init; }Bytes from the start of the shader's values.
Kind
public FieldKind Kind { get; init; }What each of its numbers is: a 32-bit float or integer.
Count
public int Count { get; init; }How many numbers: one, a vector's two to four, or a 4×4 matrix's sixteen.
IsColor
public bool IsColor { get; init; }Whether it is a color — a vector of three or four floats whose name says color or color — which starts white rather than black, and which an editor shows as a swatch.
