qmetrics.net

pixels

GPU-accelerated 2D pixel frame buffer crate

pixels screenshot

pixels is a Rust library for a GPU-backed 2D pixel buffer with fixed resolution, aimed at simple games, emulators, and software renderers. You supply windowing and input; it handles scaling and optional shaders via wgpu.

Overview

pixels exposes a Pixels type that holds an explicit-width, height pixel buffer rendered on the GPU through wgpu, which the crate re-exports. It fits rapid prototyping of 2D games, pixel animations, emulators, and software renderers where you already manage a window, event loop, and input through frameworks such as winit.

Hardware-accelerated scaling can snap to perfect pixel boundaries, and you can attach custom GPU shaders for effects such as CRT simulation. A default ScalingRenderer scales the framebuffer to the window. Environment variables documented alongside wgpu examples let you pick graphics backend, adapter name, or low versus high power GPU preference.

The library sits between a minimal framebuffer crate and a full game engine: it does not own GUI or input, but adds GPU presentation and shader hooks compared with software-only buffers. Examples in the project cover minimal winit integration, Dear ImGui, egui, WebGL2, and software raster bridges such as tiny-skia or raqote.

Compared with minifb, pixels keeps your choice of windowing and uses GPU acceleration broadly rather than software rasterization alone. DirectX 11, WebGL2, and WebGPU paths are noted as evolving in project documentation.

Key features

  • GPU-backed pixel buffer
  • wgpu graphics pipeline
  • Custom shader effects
  • Perfect-pixel scaling mode
  • ScalingRenderer for windows
  • raw-window-handle compatibility
  • GPU adapter selection env vars
  • Non-square pixel aspect (WIP)

Use cases

  • 2D game and emulator prototypes
  • Pixel-perfect scaled framebuffer
  • Software renderer with GPU output
  • Shader post-processing on pixels

Tags

Similar software

PixiJS

HTML5 WebGL and WebGPU 2D graphics library

PixiJS is a browser library for fast 2D rendering with WebGPU or WebGL. It targets games, ads, apps, and interactive sites.

  • WebGPU and WebGL 2D rendering
  • Spritesheets and asset loader
  • Filters and custom shaders
TypeScriptWeb, CLIDetails →
★ 49k⟳ 4 days agoMIT

raylib

Minimal C library for games and graphical programs

raylib is a C99 graphics and game programming library with no mandatory external dependencies. It suits prototypes, tools, education, and embedded targets across desktop, mobile, and web.

  • Bundled dependencies in one library
  • OpenGL and software render paths
  • 2D, 3D, audio, and input modules
CLinux, macOS, Windows, AndroidDetails →
★ 35.9k⟳ yesterdayZlib

Babylon.js

Browser JavaScript engine for WebGL and WebGPU 3D

Babylon.js is a web 3D engine for building games, configurators, digital twins, and XR experiences in the browser with TypeScript-friendly npm packages.

  • WebGL, WebGL2, and WebGPU rendering
  • WebXR and Web Audio integration
  • Typed npm and ES module packages
TypeScriptWebDetails →
★ 26.6k⟳ todayApache-2.0
Open Source Alternative to:Unity

WaveFunctionCollapse

Procedural bitmap and tilemap generator from one example

WaveFunctionCollapse builds output images that reuse only local pixel patterns found in a sample input. It supports bitmap synthesis and tile-based level layouts for games and art.

  • Bitmap generation from one sample image
  • Tilemap model with adjacency constraints
  • Observation and propagation collapse cycle
C#Web, Linux, macOS, WindowsDetails →
★ 25.6k⟳ 8 months agoMIT

ML-Agents

Unity toolkit for training agents in games and simulations

Unity ML-Agents turns games and simulations into training environments for intelligent agents using deep reinforcement learning and imitation learning, installed as a Unity package with Python tooling.

  • Reinforcement learning training environments
  • Imitation learning support
  • Unity editor integration
C#Details →
★ 19.9k⟳ 1 month agoApache-2.0

Matter.js

JavaScript two-dimensional rigid body physics engine

Matter.js simulates 2D rigid-body physics for browser games and interactive pages. It runs in modern browsers and Node.js with canvas rendering and touch-friendly controls.

  • Rigid and compound bodies
  • Concave and convex collision shapes
  • Constraints and gravity
JavaScriptWebDetails →
★ 18.7k⟳ 2 months agoMIT