https://github.com/tentone/rsdf
Rust sdf rendering experiments.
https://github.com/tentone/rsdf
Last synced: 11 months ago
JSON representation
Rust sdf rendering experiments.
- Host: GitHub
- URL: https://github.com/tentone/rsdf
- Owner: tentone
- License: mit
- Created: 2021-03-17T11:25:26.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-22T16:33:21.000Z (over 4 years ago)
- Last Synced: 2025-01-11T19:26:51.199Z (12 months ago)
- Language: GLSL
- Size: 860 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust SDF
- Small SDF (Signed Distance Field) rendering experiments using Rust and OpenGL.
- Implements a simple renderer for SDF and Phong illumination model (just to be able to observe the surfaces with some lighting).
- With support for desktop OpenGL and WebGL trough web assembly (check [geotoy](https://github.com/fitzgen/geotoy/tree/master/src) for an example using WASM and glium)
- [glium](https://docs.rs/glium/0.29.0/glium/) and [glutin](https://docs.rs/glutin/0.26.0/glutin/) are used to access OpenGL and obtain access to a window and input.


### Run
- Download and Install [rust](https://www.rust-lang.org/) in system. Run the run.bat or run.sh files depending on your OS.
### References
Some references for more information about SDF modelling and rendering.
- [Inigo Quilez SDF Primitives list](https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm)
- [Smooth blending between SDF](https://www.iquilezles.org/www/articles/smin/smin.htm)
- [Soft shadows in raymarched SDFs](https://www.iquilezles.org/www/articles/rmshadows/rmshadows.htm)
- [Ray Marching and Signed Distance Functions](http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/)
- [Signed Distance Fields Using Single-Pass GPU Scan Conversion of Tetrahedra](https://developer.nvidia.com/gpugems/gpugems3/part-v-physics-simulation/chapter-34-signed-distance-fields-using-single-pass-gpu)