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_dev_tools
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
›
frame_time_graph.wesl
Save
Constants
RED
#
const
RED:
vec4
<
f32
>
=
vec4(1.0, 0.0, 0.0, 1.0)
GREEN
#
const
GREEN:
vec4
<
f32
>
=
vec4(0.0, 1.0, 0.0, 1.0)
Bindings
values
#
@
group
(
1
)
@
binding
(
0
)
var
<
storage
>
values:
array
<
f32
>
config
#
@
group
(
1
)
@
binding
(
1
)
var
<
uniform
>
config:
Config
Structures
Config
#
struct
Config
{
dt_min:
f32
,
dt_max:
f32
,
dt_min_log2:
f32
,
dt_max_log2:
f32
,
proportional_width:
u32
,
}
Functions
color_from_dt
#
Gets a color based on the delta time TODO use customizable gradient
fn
color_from_dt
(
dt:
f32
)
->
vec4
<
f32
>
sdf_square
#
Draw an SDF square
fn
sdf_square
(
pos:
vec2
<
f32
>
,
half_size:
vec2
<
f32
>
,
offset:
vec2
<
f32
>
)
->
f32
fragment
#
@fragment
Calculates the final color of each pixel on the screen
fn
fragment
(
in:
UiVertexOutput
)
->
@
location
(
0
)
vec4
<
f32
>
Contents
Constants
RED
GREEN
Bindings
values
config
Structures
Config
Functions
color_from_dt
sdf_square
fragment
Gets a color based on the delta time TODO use customizable gradient