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_feathers
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
›
color_wheel.wesl
Save
Constants
RING_WIDTH
#
const
RING_WIDTH:
f32
=
12.0
SPACING
#
const
SPACING:
f32
=
4.0
MIN_HEIGHT
#
const
MIN_HEIGHT:
f32
=
100.0
PADDING
#
const
PADDING:
f32
=
4.0
MIN_DIAMETER
#
const
MIN_DIAMETER:
f32
=
MIN_HEIGHT - 2.0 * PADDING
Bindings
uniform_data
#
@
group
(
1
)
@
binding
(
0
)
var
<
uniform
>
uniform_data:
ColorPlaneUniform
Structures
ColorPlaneUniform
#
struct
ColorPlaneUniform
{
hue:
f32
,
scale:
f32
,
@
if
(
SIXTEEN_BYTE_ALIGNMENT
)
_webgl2_padding_8b:
vec2
<
f32
>
,
}
Functions
cross_2d
#
2d cross product
fn
cross_2d
(
a:
vec2
<
f32
>
,
b:
vec2
<
f32
>
)
->
f32
line_distance
#
Line distance for triangle SDF, positive on left
fn
line_distance
(
p:
vec2
<
f32
>
,
a:
vec2
<
f32
>
,
b:
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
RING_WIDTH
SPACING
MIN_HEIGHT
PADDING
MIN_DIAMETER
Bindings
uniform_data
Structures
ColorPlaneUniform
Functions
cross_2d
line_distance
fragment
2d cross product