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.

Constants

K

#
const K: f32 = 1.0
const K: f32 = 2.0
const K: f32 = 3.0

root_boost

#
const root_boost: f32 = 1.0
const root_boost: f32 = 2.0

ROOT_SECRET

#
const ROOT_SECRET: f32 = 0.5

Structures

Aux

#
struct Aux {
n: u32 ,
}
struct Aux {
n: u32 ,
extra_field: f32 ,
}

Config

#
struct Config {
size: f32 ,
@if(feat1)
extra: vec2f ,
@elif(feat2)
extra: vec3f ,
@else()
extra: f32 ,
}

Functions

util

#

this declaration shares its name with the module package::util (util.wesl): modules and declarations live in separate namespaces. gfx.wesl imports package::util and uses both util() and util::dot2.

fn util () -> f32

weight

#

– conditional function declarations and formal parameters ——————- boost only exists when feat2 is enabled; call sites are guarded the same way.

fn weight (
x: f32
, 
@if(feat2)
boost: f32
) -> f32

variant

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn variant ()
fn variant ()

my_compute

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn my_compute (
@builtin(global_invocation_id)
gid: vec3u
)
Contents