| Crates.io | blinc_gpu |
| lib.rs | blinc_gpu |
| version | 0.1.12 |
| created_at | 2026-01-14 18:25:17.820015+00 |
| updated_at | 2026-01-19 01:07:15.710557+00 |
| description | Blinc GPU renderer - SDF-based rendering via wgpu |
| homepage | |
| repository | https://github.com/project-blinc/Blinc |
| max_upload_size | |
| id | 2043405 |
| size | 702,148 |
Part of the Blinc UI Framework
This crate is a component of Blinc, a GPU-accelerated UI framework for Rust. For full documentation and guides, visit the Blinc documentation.
GPU renderer for Blinc UI using wgpu with SDF-based rendering.
blinc_gpu provides high-performance GPU rendering for the Blinc UI framework. It uses Signed Distance Field (SDF) techniques for crisp, resolution-independent rendering of UI primitives.
blinc_gpu
├── renderer.rs # Main GpuRenderer
├── primitives.rs # GPU primitive types
├── paint.rs # Paint context implementation
├── text/ # Text rendering pipeline
├── image/ # Image rendering pipeline
├── shaders/ # WGSL shader modules
│ ├── sdf.wgsl # SDF primitive rendering
│ ├── text.wgsl # Text/glyph rendering
│ ├── glass.wgsl # Glass blur effects
│ ├── blur.wgsl # Gaussian blur
│ └── image.wgsl # Image rendering
└── backbuffer.rs # Double/triple buffering
GpuPrimitive instances// Rounded rectangle with per-corner radius
fn sdf_rounded_rect(p: vec2<f32>, size: vec2<f32>, radii: vec4<f32>) -> f32
// Perfect anti-aliasing at any scale
fn alpha_from_sdf(d: f32) -> f32
// Frosted glass with backdrop blur
fn glass_blur(uv: vec2<f32>, blur_radius: f32) -> vec4<f32>
// Vibrancy with tint and saturation
fn apply_vibrancy(color: vec4<f32>, tint: vec4<f32>, saturation: f32) -> vec4<f32>
// Gaussian shadow via error function
fn shadow_alpha(d: f32, blur: f32) -> f32
use blinc_gpu::{GpuRenderer, GpuPrimitive};
// Create renderer
let renderer = GpuRenderer::new(&device, &queue, surface_format);
// Create primitives
let rect = GpuPrimitive::rect(0.0, 0.0, 100.0, 50.0)
.with_color(1.0, 0.0, 0.0, 1.0)
.with_corner_radius(8.0)
.with_border(2.0, 1.0, 1.0, 1.0, 1.0);
// Render
renderer.render_primitives(&view, &[rect]);
MIT OR Apache-2.0