Bevy Shader Explorer
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.
Packages
›
bevy_anti_alias
0.20.0
0.17.0
0.17.1
0.17.2
0.17.3
0.18.0
0.18.1
0.19.0
0.19.1
›
fxaa.wesl
Save
Constants
EDGE_THRESHOLD_MIN
#
const
EDGE_THRESHOLD_MIN:
f32
=
0.0833
const
EDGE_THRESHOLD_MIN:
f32
=
0.0625
const
EDGE_THRESHOLD_MIN:
f32
=
0.0312
const
EDGE_THRESHOLD_MIN:
f32
=
0.0156
const
EDGE_THRESHOLD_MIN:
f32
=
0.0078
EDGE_THRESHOLD_MAX
#
const
EDGE_THRESHOLD_MAX:
f32
=
0.250
const
EDGE_THRESHOLD_MAX:
f32
=
0.166
const
EDGE_THRESHOLD_MAX:
f32
=
0.125
const
EDGE_THRESHOLD_MAX:
f32
=
0.063
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
fn
fragment
(
in:
FullscreenVertexOutput
)
->
@
location
(
0
)
vec4
<
f32
>
Contents
Constants
EDGE_THRESHOLD_MIN
EDGE_THRESHOLD_MAX
ITERATIONS
SUBPIXEL_QUALITY
Bindings
screenTexture
samp
Functions
QUALITY
rgb2luma
fragment
#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5))