pub enum PortConfig {
TextureInput(u32),
TextureOutput(u32),
TextureStorage(TextureStorageConfig),
ControlOutput,
}Expand description
Port configuration variant
Each variant contains only the fields relevant to that port type, ensuring type safety and preventing invalid combinations.
§Note: No control-input variant
All parameters are implicitly controllable - any parameter can receive modulation from a control-output port without explicit declaration. MOD developers only need to declare control-output ports for nodes that generate control signals (e.g., LFO, envelope). The target parameter is selected via UI, not hardcoded in the MOD.
Variants§
TextureInput(u32)
Texture input port Value: binding slot for @group(2) @binding(N) in shader
TextureOutput(u32)
Texture output port Value: binding slot for @group(2) @binding(N) in shader
TextureStorage(TextureStorageConfig)
Texture storage port (read/write for compute shaders) Contains binding slot and format specification
ControlOutput
Control output port (sends modulation signals)
Nodes with this port type can modulate any parameter of any other node. The target is determined by graph connections (user selection in UI), not by the MOD itself. No additional data needed.
Trait Implementations§
Source§impl Clone for PortConfig
impl Clone for PortConfig
Source§fn clone(&self) -> PortConfig
fn clone(&self) -> PortConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more