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.
Star

Constants

DIFFUSE_GI_REUSE_ROUGHNESS_THRESHOLD

#
const DIFFUSE_GI_REUSE_ROUGHNESS_THRESHOLD: f32 = 0.4

SPECULAR_GI_FOR_DI_ROUGHNESS_THRESHOLD

#
Used by 1 shader in bevy_solari 0.18.1
const SPECULAR_GI_FOR_DI_ROUGHNESS_THRESHOLD: f32 = 0.0225

TERMINATE_IN_WORLD_CACHE_THRESHOLD

#
const TERMINATE_IN_WORLD_CACHE_THRESHOLD: f32 = 0.03

Bindings

view_output

#
@group(1)
@binding(0)
var view_output: texture_storage_2d<rgba16float, read_write>

gi_reservoirs_a

#
@group(1)
@binding(5)
var<storage, read_write> gi_reservoirs_a: array<Reservoir>

gbuffer

#
@group(1)
@binding(7)
var gbuffer: texture_2d<u32>

depth_buffer

#
@group(1)
@binding(8)
var depth_buffer: texture_depth_2d

view

#
@group(1)
@binding(12)
var<uniform> view: View

Structures

PushConstants

#
struct PushConstants {
frame_index: u32,
reset: u32,
}

Reservoir

#

Don’t adjust the size of this struct without also adjusting GI_RESERVOIR_STRUCT_SIZE.

struct Reservoir {
sample_point_world_position: vec3<f32>,
weight_sum: f32,
radiance: vec3<f32>,
confidence_weight: f32,
sample_point_world_normal: vec3<f32>,
unbiased_contribution_weight: f32,
}

Functions

specular_gi

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

trace_glossy_path

#
fn trace_glossy_path (
initial_ray_origin: vec3<f32>,
initial_wi: vec3<f32>,
initial_roughness: f32,
initial_p_bounce: f32,
a0: f32,
rng: ptr<function, u32>
) -> vec3<f32>

emissive_mis_weight

#
fn emissive_mis_weight (
i: u32,
initial_roughness: f32,
p_bounce: f32,
previous_surface_perfectly_specular: bool
) -> f32

nee_mis_weight

#
fn nee_mis_weight (
inverse_p_light: f32,
brdf_rays_can_hit: bool,
wo_tangent: vec3<f32>,
wi: vec3<f32>,
TBN: mat3x3<f32>
) -> f32
Contents