katamari64 / strolle

Experimental real-time renderer with support for dynamic global illumination

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strolle

Strolle (from strålspårning) is a real-time renderer with support for dynamic global illumination:

Our goal is to experiment with modern real-time lightning techniques such as ReSTIR and see how far we can go on consumer hardware (especially the one without dedicated ray-tracing cores).

Strolle comes integrated with Bevy, but can be also used on its own (through wgpu).

Status: Experimental, no official release yet (see the demo below, though!).
Platforms: Windows, Mac & Linux.

Gallery

Examples

Dungeon

$ cargo run --release --example demo

Shows a dungeon tech demo, as in the example above.

Use WASD to move and mouse to navigate the camera - extra controls include:

  • F: Toggle flashlight,
  • H/L: Adjust sun's azimuth,
  • J/K: Adjust sun's altitude,
  • T: Remove textures,
  • 1: Switch camera back to the default mode,
  • 2: Show direct lightning only,
  • 3: Show indirect diffuse lightning only,
  • 4: Show indirect specular lightning only,
  • 9: Switch camera to a path-traced reference mode (slow),
  • 0: Switch camera to Bevy's renderer,
  • ;: Toggle camera's controls on/off - useful for taking screenshots.

Model thanks to:
https://sketchfab.com/3d-models/low-poly-game-level-82b7a937ae504cfa9f277d9bf6874ad2

Cornell Box

$ cargo run --release --example cornell

Using with Bevy

(currently supported Bevy version: 0.11.3)

  1. Add Strolle to your dependencies:

    [dependencies]
    bevy_strolle = { git = "https://github.com/patryk27/strolle" }
  2. Add a patch to work-around a bug in Naga:

    [patch."crates-io"]
    naga = { git = "https://github.com/Patryk27/naga", branch = "v0.12.3-strolle" }
  3. Setup & enjoy!

    App::new()
        /* ... */
        .add_plugins(StrollePlugin);
    
    commands
        .spawn(Camera3dBundle {
            camera_render_graph: CameraRenderGraph::new(
                bevy_strolle::graph::NAME,
            ),
            camera: Camera {
                hdr: true,
                ..default()
            },
            ..default()
        });

Note that at the moment Strolle is not optimized well towards higher resolutions - especially on non-high-end GPUs it's recommended to stick to ~800x600 and upscale the camera (see the demo.rs here).

There are some tricks that Strolle could employ to support higher resolutions in the future, though.

Algorithms

Notable algorithms implemented in Strolle include:

License

MIT License

Copyright (c) 2022-2023 Patryk Wychowaniec & Jakub Trąd

About

Experimental real-time renderer with support for dynamic global illumination

License:MIT License


Languages

Language:Rust 100.0%Language:Just 0.0%