presetSlot
fun <P : Preset> StyleParameters.presetSlot(name: String, contract: GlslContract, initial: P): PresetSlot<P>(source)
A slot for presets with contract, set as parameter name. Annotate the property with @NestedParameter to show the parameters of the preset in user interfaces:
@NestedParameter("warp")
var warp: WarpPreset by presetSlot("warp", WarpPreset.CONTRACT, NoiseWarp())
// in the shade style: vec2 uv = p_warp(c_textureCoordinate);Content copied to clipboard