ShaderParameter#
One parameter a shader declares. Default is a float (Number), an sRGB hex string (Color), a System.Numerics Vector2/Vector3/Vector4, a channel letter (Channel) or null (Texture2D: a texture reference; Environment: an HDR environment reference). Maps sample as sRGB color when ColorMap is set, otherwise as linear data. Numbers are authored in the units their label names; Angle ones (degrees) reach the shader in radians and Whole ones are rounded.
public sealed record ShaderParameter(string Name, string Label, ShaderParameterKind Kind, object? Default = null)Record properties#
| Property | Type | Access | Constructor default |
|---|---|---|---|
Name | string | get; init; | required |
Label | string | get; init; | required |
Kind | ShaderParameterKind | get; init; | required |
Default | object? | get; init; | null |
Members: Angle · ColorMap · Max · Min · Whole
Angle#
public bool Angle { get; init; }ColorMap#
public bool ColorMap { get; init; }Max#
public float Max { get; init; }Initial value: float.PositiveInfinity
Min#
public float Min { get; init; }Initial value: float.NegativeInfinity
Whole#
public bool Whole { get; init; }Related types#
Source#
- SurfaceModel.cs