I read many different articles regarding ray marching in GLSL shaders (for example, this article: http://www.iquilezles.org/www/articles/rmshadows/rmshadows.htm ) and he raised some questions that I wanted to ask.
In my application, I show a scene with several grids, and I wanted to experiment with shadows. Although I seem to understand somewhat the concept of raymarching, I don’t quite understand how to properly implement this in GLSL. I know how to calculate the intersection of a ray and a plane, but how will this be processed through the GLSL shaders?
According to this topic here: ( https://gamedev.stackexchange.com/questions/67719/how-do-raymarch-shaders-work ) it mentions that you measure the distance between the beginning of the beam and the surface. Is the surface a mesh reference? Do I need to send an array of planes / points that make up the grid for the shader to calculate the ray intersection test? Do I need to use a depth buffer to determine the distance to the surface?
source
share