This is a simple raymarching/sphere tracing renderer I wrote over the course of about a week in early 2020. The rendering is all done in a GLSL shader, the window/input stuff is managed with python.
file | description |
---|---|
raymarch/shaders/shader_load_helper.py |
handles loading of shader files, including a (somewhat janky regex based) #include handler |
raymarch/shaders/fragment_shader.frag |
most of the rendering stuff is in here |
main.py |
manages window, keyboard/mouse input, etc. |
Key | Action |
---|---|
w | move forwards |
s | move backwards |
a | move left |
d | move right |
q | move up |
e | move down |
shift | move faster while held |
escape | toggle mouse controls on/off |
mouse | turn camera |
pip install -r requirements.txt
python3 main.py
Hash Without Sine (raymarch/shaders/includes/hash_without_sine.glsl
) is under MIT License, Copyright (c)2014 David Hoskins.
Signed Distance Functions (raymarch/shaders/includes/signed_distance_functions.glsl
) are by Inigo Quilez, and are under MIT License (see note on this page about license of code snippets).