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.

Bindings

depth_linear_sampler

#
@group(2)
@binding(2)
var depth_linear_sampler: sampler

depth_nearest_sampler

#
@group(2)
@binding(3)
var depth_nearest_sampler: sampler

Structures

HybridRootFinder

#
struct HybridRootFinder {
linear_steps: u32,
bisection_steps: u32,
use_secant: bool,
linear_march_exponent: f32,
jitter: f32,
min_t: f32,
max_t: f32,
}

DistanceWithPenetration

#
struct DistanceWithPenetration {
distance: f32,
valid: bool,
penetration: f32,
}

DepthRaymarchDistanceFn

#
struct DepthRaymarchDistanceFn {
depth_tex_size: vec2<f32>,
march_behind_surfaces: bool,
depth_thickness: f32,
use_sloppy_march: bool,
}

DepthRayMarchResult

#
struct DepthRayMarchResult {
hit: bool,
hit_t: f32,
hit_uv: vec2<f32>,
hit_penetration: f32,
hit_penetration_frac: f32,
}

DepthRayMarch

#
struct DepthRayMarch {
linear_steps: u32,
linear_march_exponent: f32,
bisection_steps: u32,
use_secant: bool,
jitter: f32,
ray_start_cs: vec3<f32>,
ray_end_cs: vec3<f32>,
march_behind_surfaces: bool,
use_sloppy_march: bool,
depth_thickness_linear_z: f32,
depth_tex_size: vec2<f32>,
}

Functions

hybrid_root_finder_new_with_linear_steps

#
fn hybrid_root_finder_new_with_linear_steps (
v: u32
) -> HybridRootFinder

hybrid_root_finder_find_root

#
fn hybrid_root_finder_find_root (
root_finder: ptr<function, HybridRootFinder>,
start: vec3<f32>,
end: vec3<f32>,
distance_fn: ptr<function, DepthRaymarchDistanceFn>,
hit_t: ptr<function, f32>,
miss_t: ptr<function, f32>,
hit_d: ptr<function, DistanceWithPenetration>
) -> bool

depth_raymarch_distance_fn_evaluate

#
fn depth_raymarch_distance_fn_evaluate (
distance_fn: ptr<function, DepthRaymarchDistanceFn>,
ray_point_cs: vec3<f32>
) -> DistanceWithPenetration

depth_ray_march_new_from_depth

#
Used by 1 shader in bevy_pbr 0.17.2
fn depth_ray_march_new_from_depth (
depth_tex_size: vec2<f32>
) -> DepthRayMarch

depth_ray_march_to_cs_dir_impl

#
fn depth_ray_march_to_cs_dir_impl (
raymarch: ptr<function, DepthRayMarch>,
dir_cs: vec4<f32>,
infinite: bool
)

depth_ray_march_from_cs

#
Used by 1 shader in bevy_pbr 0.17.2

March from a clip-space position (w = 1)

fn depth_ray_march_from_cs (
raymarch: ptr<function, DepthRayMarch>,
v: vec3<f32>
)

depth_ray_march_to_cs

#

Must be called after from_cs, as it will clip the world-space ray to the view frustum.

fn depth_ray_march_to_cs (
raymarch: ptr<function, DepthRayMarch>,
end_cs: vec3<f32>
)

depth_ray_march_to_cs_dir

#

Must be called after from_cs, as it will clip the world-space ray to the view frustum.

fn depth_ray_march_to_cs_dir (
raymarch: ptr<function, DepthRayMarch>,
dir: vec4<f32>
)

depth_ray_march_to_ws

#

Must be called after from_cs, as it will clip the world-space ray to the view frustum.

fn depth_ray_march_to_ws (
raymarch: ptr<function, DepthRayMarch>,
end: vec3<f32>
)

depth_ray_march_to_ws_dir

#
Used by 1 shader in bevy_pbr 0.17.2

Must be called after from_cs, as it will clip the world-space ray to the view frustum.

fn depth_ray_march_to_ws_dir (
raymarch: ptr<function, DepthRayMarch>,
dir: vec3<f32>
)

depth_ray_march_march

#
Used by 1 shader in bevy_pbr 0.17.2

Perform the ray march.

fn depth_ray_march_march (
raymarch: ptr<function, DepthRayMarch>
) -> DepthRayMarchResult
Contents