Skip to content

Rusty Days - Virtual Rust Conference Hackaton

Notifications You must be signed in to change notification settings

Rust-Wroclaw/rd-hack-Brighter3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Rusty Days Hackathon

My entry for Rusty Days - Virtual Rust Conference Hackathon

Distance field based spheres raymarching rendering shader generator

screen

Simple rules, awesome result:

Raymarching is technique that uses one simple rule to generate outstanding pictures, for each simple step you search for a distance to all objects in the scene, then you select minimal distance and move along the ray for that distance. Then you repeat until setup number of steps or when distance is smaller then selected epsilon.

You can read more about it here:

http:https://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/

It is quite hard to write such a shaders by a hand, so my contribution it visual editor written in Rust that allows to setup primitives (as now only spheres) by adding simple blocks and setup its properties (like position, radius and color). In future I am going to extend it for other primitives like plane, box, torus, prism, capsule, round cone, cylinder, octahedron, pyramid and others. I am going also add possibility to compute full constructive solid geometry (CSG) as now only union is supported - intersection and difference is missing.

Source code used:

crates:

https://crates.io/crates/shadertoy

https://crates.io/crates/nuklear-rust

IQ shader:

https://www.shadertoy.com/view/Xds3zN

screen

About

Rusty Days - Virtual Rust Conference Hackaton

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published