P.S. I ported the C++ raymaching code to shader code and it works on GPU. Both versions have issues I've discovered and I'm working on fixing them.