Skip to main content

assemble_source_with_params

Function assemble_source_with_params 

Source
pub fn assemble_source_with_params(
    user_glsl: &str,
    param_names: &[String],
) -> Result<String, AssembleError>
Expand description

Like assemble_source, but also splices a #define block — one line per param_names entry — at the defines marker so the user’s .glsl can reference each @export var name: float on the builder as the UPPERCASE NAME (backed by P.cels_user[<index>]). Names past MAX_USER_PARAMS are ignored (they have no backing slot).