macro_rules! mx_fn {
($rust:ident, $wgsl:literal, $params:expr, $ret:expr, $body:expr) => {
fn $rust() -> Rc<FnDef> {
thread_local! { static CELL: Lazy<Rc<FnDef>> = Lazy::new(); }
CELL.with(|c| c.get(|| shader_fn(Some($wgsl), $params, $ret, $body)))
}
};
}
macro_rules! mx_inline {
($rust:ident, $params:expr, $ret:expr, $body:expr) => {
fn $rust() -> Rc<FnDef> {
thread_local! { static CELL: Lazy<Rc<FnDef>> = const { Lazy::new() }; }
CELL.with(|c| c.get(|| inline_fn($params, $ret, $body)))
}
};
}
mod mx_color;
mod mx_core;
pub(crate) mod mx_nodes;
mod mx_noise;
pub use mx_nodes::*;