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

LINKED_LIST_END_SENTINEL

#
const LINKED_LIST_END_SENTINEL: u32 = 0xFFFFFFFFu

SORTED_FRAGMENT_MAX_COUNT

#
const SORTED_FRAGMENT_MAX_COUNT: u32 = constants::SORTED_FRAGMENT_MAX_COUNT

Bindings

view

#
@group(0)
@binding(0)
var<uniform> view: View

nodes

#
@group(0)
@binding(1)
var<storage, read> nodes: array<OitFragmentNode>

heads

#
@group(0)
@binding(2)
var<storage, read_write> heads: array<u32>

atomic_counter

#
@group(0)
@binding(3)
var<storage, read_write> atomic_counter: u32

depth

#
@if(!DEPTH_PREPASS)
@group(1)
@binding(0)
var depth: texture_depth_2d

Structures

OitFragment

#
struct OitFragment {
color: u32 ,
depth_alpha: u32 ,
}

FullscreenVertexOutput

#
struct FullscreenVertexOutput {
@builtin(position)
position: vec4<f32> ,
@location(0)
uv: vec2<f32> ,
}

Functions

fragment

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment ( ) ->
@location(0)
vec4<f32>

resolve

#
fn resolve (
head: u32
, 
opaque_depth: f32
) -> vec4<f32>

blend

#

OVER operator using premultiplied alpha see: https://en.wikipedia.org/wiki/Alpha_compositing

fn blend (
color_a: vec4<f32>
, 
color_b: vec4<f32>
) -> vec4<f32>

packed_depth_alpha_get_alpha

#
fn packed_depth_alpha_get_alpha (
packed: u32
) -> f32
Contents