Okay I got the cube distance function to work, quite slow but its working nonetheless, My GFX card (is card the right word when its the internal built into the motherboard variety) is ancient technology, without the benefit of shaders, so this is all done in software.
Next I'll be moving on to GetNormal...
float3 GetNormal(float3 p)
{
float eps = 0.1f;
return
normalize(
float3(
distance(p + float3(eps, 0, 0)) - distance(p - float3(eps, 0, 0)),
distance(p + float3(0, eps, 0)) - distance(p - float3(0, eps, 0)),
distance(p + float3(0, 0, eps)) - distance(p - float3(0, 0, eps))));
}
This is awesome stuff, I'm like a child on Christmas morning here.