schell / renderling

GPU driven real-time renderer, backed by wgpu and rust-gpu
https://renderling.xyz
Other
65 stars 4 forks source link
gpgpu graphics image-based-lighting physically-based-rendering rust webgpu wgpu

renderling πŸ–

Renderling is an innovative, GPU-driven renderer designed for efficient scene rendering with a focus on leveraging GPU capabilities for nearly all rendering operations. Utilizing Rust for shader development, it ensures memory safety and cross-platform compatibility, including web platforms. The project, currently in the alpha stage, aims for rapid loading of GLTF files, handling large scenes, and supporting numerous lights. Development emphasizes performance, ergonomics, observability and the use of modern rendering techniques like forward+ rendering and physically based shading.

ibl_environment_test

This project is funded through NGI Zero Core, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.

NLnet foundation logo

NGI Zero Logo

Warning

This is very much a work in progress.

What

renderling holds entire scenes of geometry, textures, materials, lighting, even the scene graph itself - in GPU buffers. All but a few of the rendering operations happen on the GPU. The CPU is used to interact with the filesystem to marshall data to the GPU and to update transforms.

Shaders are written in Rust, via rust-gpu.

Why should I use renderling

API Features

Shaders are written in Rust via rust-gpu where possible, falling back to wgsl where needed.

Rendering Features / Roadmap

Renderling takes a forward+ approach to rendering.

By default it uses a single uber-shader for rendering.

Definition

renderling noun

A small beast that looks cute up close, ready to do your graphics bidding.

Haiku

Ghost in the machine, lighting your scene with magic. Cute technology.

Project Organization

Tests

Tests use renderling in headless mode and generate images that are compared to expected output.

Running tests

cargo test

Building the shaders

The shaders/ folder is a crate that is excluded from the cargo workspace. It compiles into a program that can be run to generate the shaders:

cd shaders/ && cargo run --release

Building on WASM

RUSTFLAGS=--cfg=web_sys_unstable_apis trunk build crates/example-wasm/index.html && basic-http-server -a 127.0.0.1:8080 crates/example-wasm/dist

🫢 Sponsor this!

This work will always be free and open source. If you use it (outright or for inspiration), please consider donating.

πŸ’° Sponsor πŸ’

Special thanks

Related work & spin-off projects

Many projects were born from first solving a need within renderling. Some of these solutions were then spun off into their own projects.

Sponsoring this project contributes to the ecosystem.

License

Renderling is free and open source. All code in this repository is dual-licensed under either:

MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)

at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Notes & Devlog

I keep a list of (un)organized notes about this project here. I keep a devlog here.