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.

Functions

fragment

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

sd_rounded_box

#

From: https://github.com/bevyengine/bevy/pull/8973 The returned value is the shortest distance from the given point to the boundary of the rounded box. Negative values indicate that the point is inside the rounded box, positive values that the point is outside, and zero is exactly on the boundary. 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
Contents