Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

alpha_pattern.wgsl

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 (
corner_radii: vec4<f32>
) -> f32