Recently I've been doing a experiment on implementing raymarching in Blender's shader editor. The result is way out of my expectation. A strange moiré-pattern-like noise artifact is being generated. I just can't figure out what is happening. Such artifact is seen when using both EEVEE and Cycles.
Modifying time parameter through driver makes the shader recompile every frame when I play animation, so I write a simple geometry nodes patch to store the Scene Time as an vertex attribute.
The following images are my shader codes. I pack all the iterations in a 1-4-16-64 way.
I can't keep the hit result except using a bunch of mix nodes since there is no bool or loop termination in shader nodes, sorry.