Volumetric Raymarching

Would Secrop’s loop node help?