๐Ÿ“ฆ bevyengine / naga_oil

๐Ÿ“„ frag_reduced.wgsl ยท 20 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20struct Input {
    one: bool,
    two: bool,
    three: bool,
}

fn inner(in: Input) {
    if (in.one && in.two) {
        discard;
    }
}

@fragment
fn outer(thing: bool, thing2: bool, thing3: bool) {
    var in: Input;
    in.one = thing;
    in.two = thing2;
    in.three = thing3;
    inner(in);
}