Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

specular_gi.wgsl

Import path

Constants

DIFFUSE_GI_REUSE_ROUGHNESS_THRESHOLD

#
const DIFFUSE_GI_REUSE_ROUGHNESS_THRESHOLD: f32 = 0.4

SPECULAR_GI_FOR_DI_ROUGHNESS_THRESHOLD

#
const SPECULAR_GI_FOR_DI_ROUGHNESS_THRESHOLD: f32 = 0.0225

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 (
pixel_id: vec2<u32>
primary_surface: ResolvedGPixel
initial_ray_t: f32
initial_wi: vec3<f32>
initial_p_bounce: f32
) -> vec3<f32>

emissive_mis_weight

#
fn emissive_mis_weight (
initial_roughness: f32
p_bounce: f32
) -> f32

nee_mis_weight

#
fn nee_mis_weight (
inverse_p_light: f32
brdf_rays_can_hit: bool
wo_tangent: vec3<f32>
) -> f32

reflection_matrix

#

Shader defs requirments:

🟢 DLSS_RR_GUIDE_BUFFERS

fn reflection_matrix (
plane_normal: vec3f
) -> mat3x3<f32>

replace_primary_surface

#

Shader defs requirments:

🟢 DLSS_RR_GUIDE_BUFFERS

fn replace_primary_surface (
pixel_id: vec2<u32>
mirror_rotations: mat3x3<f32>
primary_surface_world_position: vec3<f32>
)

calculate_motion_vector

#

Shader defs requirments:

🟢 DLSS_RR_GUIDE_BUFFERS

fn calculate_motion_vector (
world_position: vec3<f32>
previous_world_position: vec3<f32>
) -> vec2<f32>