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

TEXTURED

#
const TEXTURED: u32 = 1u

RIGHT_VERTEX

#
const RIGHT_VERTEX: u32 = 2u

BOTTOM_VERTEX

#
const BOTTOM_VERTEX: u32 = 4u

BORDER_LEFT

#
const BORDER_LEFT: u32 = 256u

BORDER_TOP

#
const BORDER_TOP: u32 = 512u

BORDER_RIGHT

#
const BORDER_RIGHT: u32 = 1024u

BORDER_BOTTOM

#
const BORDER_BOTTOM: u32 = 2048u

BORDER_ANY

#
const BORDER_ANY: u32 = BORDER_LEFT + BORDER_TOP + BORDER_RIGHT + BORDER_BOTTOM

Bindings

view

#
@group(0)
@binding(0)
var<uniform> view: View

sprite_texture

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

sprite_sampler

#
@group(1)
@binding(1)
var sprite_sampler: sampler

Structures

VertexOutput

#
struct VertexOutput {
@location(0)
uv: vec2<f32>,
@location(1)
color: vec4<f32>,
@location(2)
@interpolate(flat)
size: vec2<f32>,
@location(3)
@interpolate(flat)
flags: u32,
@location(4)
@interpolate(flat)
radius: vec4<f32>,
@location(5)
@interpolate(flat)
border: vec4<f32>,
@location(6)
point: vec2<f32>,
@builtin(position)
position: vec4<f32>,
}

Functions

enabled

#
fn enabled (
flags: u32,
mask: u32
) -> bool

vertex

#
@vertex
Processes each 3D point in a model before it's drawn
fn vertex (
@location(0)
vertex_position: vec3<f32>,
@location(1)
vertex_uv: vec2<f32>,
@location(2)
vertex_color: vec4<f32>,
@location(3)
flags: u32,
@location(4)
radius: vec4<f32>,
@location(5)
border: vec4<f32>,
@location(6)
size: vec2<f32>,
@location(7)
point: vec2<f32>
) -> VertexOutput

sd_rounded_box

#

Arguments: - point -> The function will return the distance from this point to the closest point on the boundary. - size -> The maximum width and height of the box. - corner_radii -> The radius of each rounded corner. Ordered counter clockwise starting top left: x: top left, y: top right, z: bottom right, w: bottom left.

fn sd_rounded_box (
point: vec2<f32>,
size: vec2<f32>,
corner_radii: vec4<f32>
) -> f32

sd_inset_rounded_box

#
fn sd_inset_rounded_box (
point: vec2<f32>,
size: vec2<f32>,
radius: vec4<f32>,
inset: vec4<f32>
) -> f32

nearest_border_active

#
fn nearest_border_active (
point_vs_mid: vec2<f32>,
size: vec2<f32>,
width: vec4<f32>,
flags: u32
) -> bool

antialias

#

get alpha for antialiasing for sdf

fn antialias (
distance: f32
) -> f32

draw_uinode_border

#
Used by 1 shader in bevy_ui_render 0.18.1
fn draw_uinode_border (
color: vec4<f32>,
point: vec2<f32>,
size: vec2<f32>,
radius: vec4<f32>,
border: vec4<f32>,
flags: u32
) -> vec4<f32>

draw_uinode_background

#
Used by 1 shader in bevy_ui_render 0.18.1
fn draw_uinode_background (
color: vec4<f32>,
point: vec2<f32>,
size: vec2<f32>,
radius: vec4<f32>,
border: vec4<f32>
) -> vec4<f32>

fragment

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment ( ) ->
@location(0)
vec4<f32>
Contents