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

EDGE_THRESHOLD_MIN

#
Active when
EDGE_THRESH_MIN_LOW
const EDGE_THRESHOLD_MIN: f32 = 0.0833
Active when
EDGE_THRESH_MIN_MEDIUM
const EDGE_THRESHOLD_MIN: f32 = 0.0625
Active when
EDGE_THRESH_MIN_HIGH
const EDGE_THRESHOLD_MIN: f32 = 0.0312
Active when
EDGE_THRESH_MIN_ULTRA
const EDGE_THRESHOLD_MIN: f32 = 0.0156
Active when
EDGE_THRESH_MIN_EXTREME
const EDGE_THRESHOLD_MIN: f32 = 0.0078

EDGE_THRESHOLD_MAX

#
Active when
EDGE_THRESH_LOW
const EDGE_THRESHOLD_MAX: f32 = 0.250
Active when
EDGE_THRESH_MEDIUM
const EDGE_THRESHOLD_MAX: f32 = 0.166
Active when
EDGE_THRESH_HIGH
const EDGE_THRESHOLD_MAX: f32 = 0.125
Active when
EDGE_THRESH_ULTRA
const EDGE_THRESHOLD_MAX: f32 = 0.063
Active when
EDGE_THRESH_EXTREME
const EDGE_THRESHOLD_MAX: f32 = 0.031

ITERATIONS

#
const ITERATIONS: i32 = 12

SUBPIXEL_QUALITY

#
const SUBPIXEL_QUALITY: f32 = 0.75

Bindings

screenTexture

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

samp

#
@group(0)
@binding(1)
var samp: sampler

Functions

QUALITY

#

#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5))

fn QUALITY (
q: i32
) -> f32

rgb2luma

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

fragment

#
@fragment
Calculates the final color of each pixel on the screen

Performs FXAA post-process anti-aliasing as described in the Nvidia FXAA white paper and the associated shader code.

fn fragment ( ) ->
@location(0)
vec4<f32>
Contents