https://github.com/stefanasandei/ray-marching
⚡ a simple ray marcher
https://github.com/stefanasandei/ray-marching
Last synced: 4 months ago
JSON representation
⚡ a simple ray marcher
- Host: GitHub
- URL: https://github.com/stefanasandei/ray-marching
- Owner: stefanasandei
- License: gpl-3.0
- Created: 2022-10-21T18:11:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-21T18:13:17.000Z (over 2 years ago)
- Last Synced: 2025-01-04T15:35:59.730Z (5 months ago)
- Language: Rust
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ray-marching ⚡
This is an implementation of the ray marching algorithm, a rendering technique.
## How it works - TLDR
Ray marching is like a simplified version of ray tracing. Instead of sending rays recursively into the scene and checking for collisions, it uses `signed distance field functions` to iteratively determine the distance to any object in the scene. The ray travels until the minimum distance is smaller than an `epsilon` value, 0.0001, which means we hit an object.
Some uses of it include 3D fractals and creating infinite scenes, not necessarily made out of triangles. Very few games use it.

## Resources
Here are some of the sources I used to learn this algorithm:
- https://iquilezles.org/articles/distfunctions/
- http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/
- https://www.shadertoy.com/view/Xds3zN
- https://www.shadertoy.com/view/3sySRK## License
[GPLv3](LICENSE) © [Asandei Stefan](https://www.stefan-asandei.cf)