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.

light_probe.wgsl

Import path

Structures

LightProbeQueryResult

#

Light probe iterators yield values of this type. Note that multiple light probes can affect a single fragment.

struct LightProbeQueryResult {
texture_index: i32 ,
intensity: f32 ,
light_from_world: mat4x4<f32> ,
parallax_correction_bounds: vec3<f32> ,
weight: f32 ,
flags: u32 ,
}

LightProbeIterator

#

This is the version used when light probes are clustered.

struct LightProbeIterator {
current_offset: u32 ,
end_offset: u32 ,
world_position: vec3<f32> ,
is_irradiance_volume: bool ,
}

LightProbeIterator

#

This is the version that’s used when sufficient storage buffers aren’t available and consequently when light probes aren’t clustered. It simply does a brute force search of all light probes. Because platforms without sufficient SSBO bindings typically lack bindless shaders, there will usually only be one of each type of light probe present anyway.

struct LightProbeIterator {
current_index: u32 ,
end_index: u32 ,
world_position: vec3<f32> ,
is_irradiance_volume: bool ,
}

Functions

transpose_affine_matrix

#
fn transpose_affine_matrix ( ) -> mat4x4<f32>

light_probe_iterator_new

#

Creates a new light probe iterator ready to iterate through light probes in the froxel containing the world_position.

fn light_probe_iterator_new (
world_position: vec3<f32>
is_irradiance_volume: bool
clusterable_object_index_ranges: ptr<function, ClusterableObjectIndexRanges>
) -> LightProbeIterator

light_probe_iterator_next

#

Note that multiple light probes can affect a fragment. The caller is generally expected to blend their influences together in a weighted sum.

fn light_probe_iterator_next ( ) -> LightProbeQueryResult

light_probe_iterator_new

#

Creates a new light probe iterator ready to search through light probes.

fn light_probe_iterator_new (
world_position: vec3<f32>
is_irradiance_volume: bool
clusterable_object_index_ranges: ptr<function, ClusterableObjectIndexRanges>
) -> LightProbeIterator

light_probe_iterator_next

#

Note that, theoretically, multiple light probes can affect a fragment, and the caller is generally expected to blend their influences together in a weighted sum. In practice, this version of light_probe_iterator_next is used on platforms that lack bindless shaders, so there will only be at most one light probe that affects the current fragment in the first place.

fn light_probe_iterator_next ( ) -> LightProbeQueryResult