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

NULL_LIGHT_ID

#
const NULL_LIGHT_ID: u32 = 0xFFFFFFFFu

Structures

LightSample

#
struct LightSample {
light_id: u32 ,
seed: u32 ,
}

ResolvedLightSample

#
struct ResolvedLightSample {
world_position: vec4<f32> ,
world_normal: vec3<f32> ,
radiance: vec3<f32> ,
inverse_pdf: f32 ,
}

LightContribution

#
struct LightContribution {
radiance: vec3<f32> ,
inverse_pdf: f32 ,
inverse_solid_angle_pdf: f32 ,
wi: vec3<f32> ,
brdf_rays_can_hit: bool ,
}

GenerateRandomLightSampleResult

#
struct GenerateRandomLightSampleResult {
light_sample: LightSample ,
resolved_light_sample: ResolvedLightSample ,
}

Functions

power_heuristic

#
fn power_heuristic (
f: f32
, 
g: f32
) -> f32

balance_heuristic

#
fn balance_heuristic (
f: f32
, 
g: f32
) -> f32

sample_ggx_vndf

#

https://gpuopen.com/download/Bounded_VNDF_Sampling_for_Smith-GGX_Reflections.pdf (Listing 1) Result is invalid when output.z <= 0.0, and must be discarded

fn sample_ggx_vndf (
wi_tangent: vec3<f32>
, 
roughness: f32
, 
rng: ptr<function, u32>
) -> vec3<f32>

ggx_vndf_sample_invalid

#
fn ggx_vndf_sample_invalid (
ray_tangent: vec3<f32>
) -> bool

ggx_vndf_pdf

#
fn ggx_vndf_pdf (
wi_tangent: vec3<f32>
, 
wo_tangent: vec3<f32>
, 
roughness: f32
) -> f32

isinf

#
fn isinf (
x: f32
) -> bool

isnan

#
fn isnan (
x: f32
) -> bool

sample_random_light

#
fn sample_random_light (
ray_origin: vec3<f32>
, 
origin_world_normal: vec3<f32>
, 
rng: ptr<function, u32>
) -> LightContribution

random_emissive_light_pdf

#
fn random_emissive_light_pdf (
hit: ResolvedRayHitFull
, 
ray_distance: f32
, 
NdotV: f32
) -> f32

sample_environment_map_light

#
fn sample_environment_map_light (
world_direction: vec3<f32>
) -> vec3<f32>

generate_random_light_sample

#
fn generate_random_light_sample (
rng: ptr<function, u32>
) -> GenerateRandomLightSampleResult

resolve_light_sample

#
fn resolve_light_sample (
light_sample: LightSample
, 
light_source: LightSource
) -> ResolvedLightSample

calculate_resolved_light_contribution

#
fn calculate_resolved_light_contribution (
resolved_light_sample: ResolvedLightSample
, 
ray_origin: vec3<f32>
, 
origin_world_normal: vec3<f32>
) -> LightContribution

trace_visibility

#
fn trace_visibility (
ray_origin: vec3<f32>
, 
point: vec4<f32>
) -> f32

trace_visibility_previous_frame

#
fn trace_visibility_previous_frame (
ray_origin: vec3<f32>
, 
point: vec4<f32>
) -> f32

triangle_barycentrics

#
Contents