diff --git a/out.jpg b/out.jpg index 38071cb..9d5a69f 100644 Binary files a/out.jpg and b/out.jpg differ diff --git a/tinykaboom.cpp b/tinykaboom.cpp index a1ee1ca..f636497 100644 --- a/tinykaboom.cpp +++ b/tinykaboom.cpp @@ -11,8 +11,7 @@ const float sphere_radius = 1.5; const float noise_amplitude = 0.2; float signed_distance(const Vec3f &p) { - Vec3f s = Vec3f(p).normalize(sphere_radius); - float displacement = sin(16*s.x)*sin(16*s.y)*sin(16*s.z)*noise_amplitude; + float displacement = sin(16*p.x)*sin(16*p.y)*sin(16*p.z)*noise_amplitude; return p.norm() - (sphere_radius + displacement); }