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

DEFAULT_HISTORY_BLEND_RATE

#
const DEFAULT_HISTORY_BLEND_RATE: f32 = 0.1

MIN_HISTORY_BLEND_RATE

#
const MIN_HISTORY_BLEND_RATE: f32 = 0.015

Bindings

view_target

#
@group(0)
@binding(0)
var view_target: texture_2d<f32>

history

#
@group(0)
@binding(1)
var history: texture_2d<f32>

motion_vectors

#
@group(0)
@binding(2)
var motion_vectors: texture_2d<f32>

depth

#
@group(0)
@binding(3)
var depth: texture_depth_2d

nearest_sampler

#
@group(0)
@binding(4)
var nearest_sampler: sampler

linear_sampler

#
@group(0)
@binding(5)
var linear_sampler: sampler

Structures

Output

#
struct Output {
@location(0)
view_target: vec4<f32> ,
@location(1)
history: vec4<f32> ,
}

Functions

rcp

#

TAA is ideally applied after tonemapping, but before post processing Post processing wants to go before tonemapping, which conflicts Solution: Put TAA before tonemapping, tonemap TAA input, apply TAA, invert-tonemap TAA output https://advances.realtimerendering.com/s2014/index.html#_HIGH-QUALITY_TEMPORAL_SUPERSAMPLING, slide 20 https://gpuopen.com/learn/optimized-reversible-tonemapper-for-resolve

fn rcp (
x: f32
) -> f32

max3

#
fn max3 (
x: vec3<f32>
) -> f32

tonemap

#
fn tonemap (
color: vec3<f32>
) -> vec3<f32>

reverse_tonemap

#
fn reverse_tonemap (
color: vec3<f32>
) -> vec3<f32>

RGB_to_YCoCg

#
fn RGB_to_YCoCg (
rgb: vec3<f32>
) -> vec3<f32>

YCoCg_to_RGB

#
fn YCoCg_to_RGB (
ycocg: vec3<f32>
) -> vec3<f32>

clip_towards_aabb_center

#
fn clip_towards_aabb_center (
history_color: vec3<f32>
, 
current_color: vec3<f32>
, 
aabb_min: vec3<f32>
, 
aabb_max: vec3<f32>
) -> vec3<f32>

sample_history

#
fn sample_history (
u: f32
, 
v: f32
) -> vec3<f32>

sample_view_target

#
fn sample_view_target (
uv: vec2<f32>
) -> vec3<f32>

taa

#
@fragment
Calculates the final color of each pixel on the screen
fn taa (
@location(0)
uv: vec2<f32>
) -> Output
Contents