struct Uniforms { resolution: vec2, // viewport size (pixels) origin: vec2, // start point (pixels) len0: f32, // first horizontal segment (to the right) len2: f32, // last horizontal segment (to the right) drop: f32, // vertical drop between segments thickness: f32, // inner half-width border: f32, // border thickness border_color: vec4, color_start: vec4, color_end: vec4, }; @group(0) @binding(0) var U: Uniforms; struct VertexOutput { @builtin(position) position : vec4, @location(0) uv : vec2, }; @fragment fn fragment(mesh: VertexOutput) -> @location(0) vec4 { let u = clamp(mesh.uv.x, 0.0, 1.0); return vec4(mesh.position.x / 1000.0, mesh.position.y / 1000.0, 0.0, 1.0); }