Class Fx2Parameter
- Namespace
- ShadowDusk.Core
- Assembly
- ShadowDusk.Core.dll
One fx_2_0 effect parameter. Three kinds share this record, distinguished by
Class/Type (raw D3DXPARAMETER / MojoShader symbol values,
see docs/fx2-binary-format.md §6.1): numerics (class 0–3, type bool/int/float),
textures (class 4, type 5–9), and samplers (class 4, type 10–14, carrying
SamplerStates).
public sealed record Fx2Parameter : IEquatable<Fx2Parameter>
- Inheritance
-
Fx2Parameter
- Implements
- Inherited Members
Properties
Class
D3DXPARAMETER_CLASS: 0=scalar, 1=vector, 2=matrix-rows, 3=matrix-cols, 4=object.
public required int Class { get; init; }
Property Value
Columns
Logical column count (numeric classes only).
public int Columns { get; init; }
Property Value
DefaultValue
Default value for numeric parameters, laid out as the file rows of the value blob
(row r = the contents of constant register r — Rows × Columns floats per
element). null writes zeros, matching the MGFX writer's behavior.
public IReadOnlyList<float>? DefaultValue { get; init; }
Property Value
Elements
Array element count; 0 = not an array (0 and 1 are distinct on disk).
public int Elements { get; init; }
Property Value
Name
The parameter name (must exactly match the corresponding CTAB constant name).
public required string Name { get; init; }
Property Value
Rows
Logical row count (numeric classes only).
public int Rows { get; init; }
Property Value
SamplerStates
Sampler-state assignments (sampler parameters only).
public IReadOnlyList<Fx2SamplerState> SamplerStates { get; init; }
Property Value
Semantic
Optional HLSL semantic; null = none.
public string? Semantic { get; init; }
Property Value
Type
D3DXPARAMETER_TYPE: 1=bool, 2=int, 3=float, 5=texture, 10–14=sampler…
public required int Type { get; init; }