Created WebGL fragment shaders that utilize raymarching and signed distance functions. To create the fragment shaders, I generated a mesh that maps to the canonical screen space coordinates of the viewport. I have created four different fragment shaders for the program.
The best way to run the project is by using a local HTTP server. The steps to run this project will use Python's local web server package.
Navigate to the directory where the project has been cloned. Then, run the following python command:
python3 -m http.server
Once the server is running locally, connect to it via the proper port number:
localhost:<port number>
To change out the active fragment shader, modify the line below in the index.html file:
<script id="fragShader" type="x-shader/x-fragment" src=<desired fragment shader> ></script>
Replace <desired fragment shader>
with one of the specified fragment shaders above. For example:
<script id="fragShader" type="x-shader/x-fragment" src="Spheres.glsl" ></script>