This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Commented version of https://twitter.com/zozuar/status/1441384708441456651 | |
// Google-translated (with some editing) from @gam0022's version | |
float i, // Ray marching loop counter | |
e, // Volume density (the smaller the value, the higher the density) | |
s, // FBM scale (and loop counter) | |
g, // Ray's distance (also used for tunnel twirl and camera prespective) | |
k = .01; // Handy constant | |
// Ray marching loop |