Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pixel_engine

2D voxel engine for Bevy: a chunked tile world, fixed-cost GPU radiance transport, and height-projected voxel rendering.

Module Owns
tile The Tile enum and the static Material table: optics, solidity, base color
world Chunk, TileWorld: storage, coordinates, solid queries, dirty flags
light Fixed-cost radiance transport, end to end
gpu_light Compute execution of that transport: buffers, pipelines, time-sliced dispatch, readback
render Chunk images, lit top faces, voxel sides, height projection
fps The always-on average + worst-frame readout

What makes it interesting

  • Fixed-cost 2D global illumination: 24 primary directions plus two eight-direction diffuse bounces and an area sun, solved per lighting page on the GPU and composed into a retained visual atlas that tile materials read directly — cost is bounded by area, not by light count.
  • Time-sliced dispatch: a lighting job's sweeps are serialized scanline walks, so the render world advances the oldest incomplete job by at most one sweep per frame. Lighting never stacks a whole compute chain into a single GPU frame, which keeps worst-frame times flat.
  • Allocation-free uploads: job inputs are byte-cast from persistent scratch straight into Queue::write_buffer.
  • Height-projected voxels: layer height renders as real voxel geometry; side walls project and cull in the vertex shader, so camera motion costs no mesh rebuilds.
  • CPU reference solver: the GPU path is an accelerator for an identical CPU transport, which remains as the comparison baseline and automatic fallback.

Using it

The engine ships systems, resources, and two plugins (EngineShadersPlugin for its embedded WGSL, gpu_light::GpuLightingPlugin for the render-world half of the transport). The host application decides schedule order and registers everything into its own phases; see pixelGame for a complete host.

[dependencies]
pixel_engine = { git = "https://github.com/Isolyth/pixelgameengine" }

or vendor it as a git submodule and use a path dependency.

License

LGPL-3.0-or-later. See COPYING.LESSER and COPYING.

About

Bevy 2D voxel game engine with GPU radiance-cascade lighting

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages