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.

frame_time_graph.wgsl

Constants

RED

#
const RED: vec4<f32> = vec4(1.0, 0.0, 0.0, 1.0)

GREEN

#
const GREEN: vec4<f32> = vec4(0.0, 1.0, 0.0, 1.0)

Bindings

values

#
@group(1)
@binding(0)
var<storage> values: array<f32>

config

#
@group(1)
@binding(1)
var<uniform> config: Config

Structures

Config

#
struct Config {
dt_min: f32 ,
dt_max: f32 ,
dt_min_log2: f32 ,
dt_max_log2: f32 ,
proportional_width: u32 ,
}

Functions

color_from_dt

#

Gets a color based on the delta time TODO use customizable gradient

fn color_from_dt ( ) -> vec4<f32>

sdf_square

#

Draw an SDF square

fn sdf_square (
half_size: vec2<f32>
) -> f32

fragment

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