restir_gi.wgsl
Constants
Structures
Functions
@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
@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
fn
generate_initial_reservoir
(
world_position:
vec3<f32>
,
world_normal:
vec3<f32>
,
rng:
ptr<function, u32>
)
->
Reservoir
fn
load_temporal_reservoir
(
pixel_id:
vec2<u32>
,
depth:
f32
,
world_position:
vec3<f32>
,
world_normal:
vec3<f32>
)
->
NeighborInfo
fn
load_temporal_reservoir_inner
(
temporal_pixel_id:
vec2<u32>
,
depth:
f32
,
world_position:
vec3<f32>
,
world_normal:
vec3<f32>
)
->
NeighborInfo
fn
load_spatial_reservoir
(
pixel_id:
vec2<u32>
,
depth:
f32
,
world_position:
vec3<f32>
,
world_normal:
vec3<f32>
,
rng:
ptr<function, u32>
)
->
NeighborInfo
fn
get_neighbor_pixel_id
(
center_pixel_id:
vec2<u32>
,
search_radius:
f32
,
rng:
ptr<function, u32>
)
->
vec2<u32>
fn
empty_reservoir
()
fn
merge_reservoirs
(
canonical_reservoir:
Reservoir
,
canonical_world_position:
vec3<f32>
,
canonical_world_normal:
vec3<f32>
,
canonical_diffuse_brdf:
vec3<f32>
,
other_reservoir:
Reservoir
,
other_world_position:
vec3<f32>
,
other_world_normal:
vec3<f32>
,
other_diffuse_brdf:
vec3<f32>
,
rng:
ptr<function, u32>
)
->
ReservoirMergeResult