wgsl-preprocessor/shaders/out.wgsl

11 lines
276 B
WebGPU Shading Language

// ==== START OF INCLUDE OF 'shaders/simple.wgsl' ====
fn do_something_cool(in: f32) -> f32 {
return in * 2.0;
}
// ==== END OF INCLUDE OF 'shaders/simple.wgsl' ====
fn main() -> vec4<f32> {
let a = do_something_cool(10.0);
return vec4<f32>(vec3<f32>(a), 1.0);
}