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

SPATIAL_REUSE_RADIUS_PIXELS

#
const SPATIAL_REUSE_RADIUS_PIXELS: AbstractFloat = 30.0

Structures

NeighborInfo

#
struct NeighborInfo {
reservoir: Reservoir ,
world_position: vec3<f32> ,
world_normal: vec3<f32> ,
material: ResolvedMaterial ,
}

ReservoirMergeResult

#
struct ReservoirMergeResult {
merged_reservoir: Reservoir ,
selected_sample_brdf_radiance: vec3<f32> ,
}

ReservoirContribution

#
struct ReservoirContribution {
brdf_radiance: vec3<f32> ,
target_function: f32 ,
sample_world_position: vec4<f32> ,
}

Functions

initial_and_temporal

#
@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 initial_and_temporal (
@builtin(workgroup_id)
workgroup_id: vec3<u32>
, 
@builtin(global_invocation_id)
global_id: vec3<u32>
)

spatial_and_shade

#
@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 spatial_and_shade (
@builtin(global_invocation_id)
global_id: vec3<u32>
)

load_temporal_reservoir

#
fn load_temporal_reservoir (
pixel_id: vec2<u32>
, 
depth: f32
, 
world_position: vec3<f32>
, 
world_normal: vec3<f32>
) -> NeighborInfo

load_spatial_reservoir

#
fn load_spatial_reservoir (
pixel_id: vec2<u32>
, 
depth: f32
, 
world_position: vec3<f32>
, 
world_normal: vec3<f32>
, 
rng: ptr<function, u32>
) -> NeighborInfo

get_neighbor_pixel_id

#
fn get_neighbor_pixel_id (
center_pixel_id: vec2<u32>
, 
search_radius: f32
, 
rng: ptr<function, u32>
) -> vec2<u32>

empty_material

#
fn empty_material () -> ResolvedMaterial

jacobian

#
fn jacobian (
new_world_position: vec3<f32>
, 
original_world_position: vec3<f32>
, 
sample_point_world_position: vec3<f32>
, 
sample_point_world_normal: vec3<f32>
) -> f32

merge_reservoirs

#
fn merge_reservoirs (
canonical_reservoir: Reservoir
, 
canonical_world_position: vec3<f32>
, 
canonical_world_normal: vec3<f32>
, 
canonical_material: ResolvedMaterial
, 
other_reservoir: Reservoir
, 
other_world_position: vec3<f32>
, 
other_world_normal: vec3<f32>
, 
other_material: ResolvedMaterial
, 
other_view_position: vec3<f32>
, 
rng: ptr<function, u32>
) -> ReservoirMergeResult

reservoir_contribution

#
fn reservoir_contribution (
reservoir: Reservoir
, 
resolved: ResolvedLightSample
, 
world_position: vec3<f32>
, 
world_normal: vec3<f32>
, 
wo: vec3<f32>
, 
material: ResolvedMaterial
, 
F_ab: vec2<f32>
) -> ReservoirContribution
Contents