wgsl-preprocessor/examples/simple.wgsl

8 lines
196 B
WebGPU Shading Language

#define_module simple
#import inner::some_include::{scalar, mult_some_nums}
const simple_scalar: f32 = 50.0;
fn do_something_cool(in: f32) -> f32 {
return scalar * mult_some_nums(in, 2.0);
}