I am working on a sandbox app that model stuff using SDF and its operators. I want to do the actual rendering on GPU. So once the SDF is defined (ex. box union with sphere, etc.) how do I push it to the GPU?
What currently comes in my mind is to define all possible SDF functions also on the GPU shader and map them to short command strings, send an array of commands to GPU (union, box, sphere, etc.) and call the mapped functions. Is there a better way?