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.

gbuffer_utils.wgsl

Import path

Structures

ResolvedGPixel

#
struct ResolvedGPixel {
world_position: vec3<f32> ,
world_normal: vec3<f32> ,
material: ResolvedMaterial ,
}

Functions

gpixel_resolve

#
fn gpixel_resolve (
depth: f32
pixel_id: vec2<u32>
view_size: vec2<f32>
world_from_clip: mat4x4<f32>
) -> ResolvedGPixel

reconstruct_world_position

#
fn reconstruct_world_position (
pixel_id: vec2<u32>
depth: f32
view_size: vec2<f32>
world_from_clip: mat4x4<f32>
) -> vec3<f32>

pixel_dissimilar

#

Reject if tangent plane differs more than 0.3% or angle between normals more than 90 degrees

fn pixel_dissimilar (
depth: f32
world_position: vec3<f32>
other_world_position: vec3<f32>
other_normal: vec3<f32>
view: View
) -> bool

permute_pixel

#
fn permute_pixel (
pixel_id: vec2<u32>
frame_index: u32
view_size: vec2<f32>
) -> vec2<u32>