Constants
Functions
f1
#function with no return type and empty body
fn
f1
()
f2
#f3
#f4
#f5
#must_use attribute
f7
#expressions
fn
f7
()
f8
#statements
fn
f8
()
f9
#f10
#
@fragment
Calculates the final color of each pixel on the screen
vert_main
#
@vertex
Processes each 3D point in a model before it's drawn
frag_main
#
@fragment
Calculates the final color of each pixel on the screen
comp_main1
#
@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
comp_main1
()
comp_main2
#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(8, 8)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
comp_main3
#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(8, 8, 1, )
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
f11
#f12
#
fn
f12
()
f13
#nested member and swizzle write targets
fn
f13
()
structs