Tour of WGSL

Function Calls

Functions can be declared in any order.

Function calls cannot be recursive, either directly:

1
2
3
fn a() {
  a(); // error
}

or indirectly:

1
2
3
4
5
6
fn a() {
  b(); // error
}
fn b() {
  a(); // error
}