GitHunt
FA

A high performance rendering engine implemented in Rust

Helio Renderer

A production-grade real-time renderer built on wgpu

WIP

Rust
wgpu
License
Platform
glam
bytemuck
PBR
GI
CSM
Sky

Cross-platform, data-driven, physically-based rendering β€” with a render graph, radiance cascades GI, cascaded shadow maps, volumetric sky, and bloom β€” all in pure Rust.

Screenshot 1 Screenshot 2
Screenshot 3 Screenshot 4
Screenshot 5 Screenshot 6
image

πŸš€ Features

Rendering

  • Physically-Based Shading β€” metallic/roughness PBR with Cook-Torrance BRDF
  • Cascaded Shadow Maps β€” 4-cascade CSM with PCF filtering, zero Peter-Panning front-face culling
  • Radiance Cascades GI β€” screen-space global illumination with smooth probe volume blending
  • Hemisphere Ambient β€” HL2-style two-color analytical ambient fallback for areas outside GI coverage
  • Bloom β€” multi-pass physically-based bloom

Lighting

  • Directional lights (sun/moon with CSM)
  • Point lights with attenuation
  • Spot lights
  • Per-light shadow casting
  • Skylight ambient from atmosphere color

Sky & Atmosphere

  • Rayleigh + Mie scattering β€” physically accurate multi-layer atmosphere
  • Dynamic time-of-day β€” rotate the sun in real time; sky, shadows, and ambient all respond
  • Cheap volumetric clouds β€” planar-intersection FBM clouds with analytical sun lighting and sunset tint; near-zero GPU cost

Architecture

  • Render graph β€” automatic pass ordering and resource dependency resolution
  • Pipeline cache β€” compiled PSO variants with instant hot-swapping via specialization constants
  • Resource pooling β€” texture and buffer aliasing for minimal VRAM overhead
  • Shared bind groups β€” proper resource sharing across features; no redundant uploads
  • Billboards β€” GPU-instanced camera-facing sprites with correct depth occlusion

πŸ“¦ Crates

Crate Description
helio-render-v2 Core renderer library β€” scene, mesh, material, passes, features
helio-core Shared primitives and math utilities
examples Runnable demos

🏁 Getting Started

Prerequisites

Run the examples

# Sky atmosphere demo β€” sun rotation, colored point lights, clouds
cargo run --example render_v2_sky --release

# Basic scene β€” geometry, point lights, shadows
cargo run --example render_v2_basic --release

WASM example server (Ensure your browser ships with WASM and WebGPU (latest Chrome is a good bet))

Univrsal (https://github.com/powershell/powershell/releases/latest)
 ./build-wasm.ps1
 cargo run --release --bin helio-wasm-server
Unix
 ./build-wasm.sh
 cargo run --release --bin helio-wasm-server

Controls (sky example)

Key Action
W A S D Move forward / left / back / right
Space / Shift Move up / down
Q / E Rotate sun (time of day)
Mouse drag Look around (click to grab cursor)
Escape Release cursor

πŸ”§ Usage

use helio_render_v2::{Renderer, RendererConfig, Camera, Scene, SceneLight};
use helio_render_v2::features::{
    FeatureRegistry, LightingFeature, ShadowsFeature,
    BloomFeature, RadianceCascadesFeature,
};

// Build the renderer
let config = RendererConfig::default();
let mut renderer = Renderer::new(&device, &queue, surface_format, config).await?;

// Register features
let mut registry = FeatureRegistry::new();
registry.add(LightingFeature::new(&device));
registry.add(ShadowsFeature::new(&device));
registry.add(RadianceCascadesFeature::new(&device));
registry.add(BloomFeature::new(&device));

// Describe your scene
let scene = Scene {
    lights: vec![
        SceneLight::directional([0.4, -0.8, 0.4], [1.0, 0.95, 0.8], 3.0),
    ],
    sky: Some(SkyAtmosphere::default()),
    ..Default::default()
};

// Render loop
renderer.render(&device, &queue, &surface, &camera, &scene, &registry)?;

πŸ—ΊοΈ Roadmap

  • SSAO
  • Screen-space reflections
  • Skeletal animation
  • Point light shadows
  • Temporal anti-aliasing (TAA)
  • WASM / WebGPU target

πŸ“± Android

$env:ANDROID_HOME = "C:\Users\...\Android\Sdk"
$env:ANDROID_NDK_ROOT = "$env:ANDROID_HOME\ndk\29.0.14206865"
cargo apk build -p feature_complete_android --target aarch64-linux-android

πŸ“„ License

MIT


Built with ❀️ in Rust · Powered by wgpu
Far-Beyond-Pulsar/Helio | GitHunt