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

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