wgpu-pp 1.0.1

Simple, C-style preprocessor for WGSL using proc macros.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// COMMENTS 2
// Block comments

#define PI (3.14159)

/* this should work */ #include "basic.wgsl" /* this too */

/* this should not work #undef PI */

/* multi line
// */

fn times_pi(x: f32) -> f32 {
    // Should still be PI.
    return x * PI;
}