Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1// module `package::util::ops`.
3// super import: `super` = `package::util` (util.wesl), one level up.
4import super::EPSILON;
6public fn double(x: f32) -> f32 {
7 return x * 2.0;
8}
10// package-visible items, bound in the root module via the conditional
11// `import ... as op` statements.
12fn scale(x: f32) -> f32 {
13 return x * 4.0 + EPSILON;
16fn shift(x: f32) -> f32 {
17 return x + 4.0;
20// picked up by the root module through the wildcard import `ops::*`.
21const OPS_BASE: f32 = 4.0;
23// const_asserts of this module are included because its items are used.
24const_assert OPS_BASE > 0.0;
Contents