diff options
author | Keuin <[email protected]> | 2022-04-16 19:08:28 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-16 19:08:28 +0800 |
commit | 60d8221109304bc4f207dda8a42623cae488af5d (patch) | |
tree | 5f4c59a81d58d14666226ee1f7da5299db98f9f5 /material_diffusive.cpp | |
parent | 52d11df35ca9846085b910e2e40434b48847d9d8 (diff) |
Move trace logging to tracelog.h.
Pixel-wise, comprehensive, beautiful trace logging.
Diffstat (limited to 'material_diffusive.cpp')
-rw-r--r-- | material_diffusive.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/material_diffusive.cpp b/material_diffusive.cpp index b3f0207..58c9c45 100644 --- a/material_diffusive.cpp +++ b/material_diffusive.cpp @@ -4,6 +4,7 @@ #include "vec.h" #include "material_diffusive.h" +#include "tracelog.h" bool material_diffuse_lambertian::scatter(ray3d &r, const object &hit_obj, double hit_t, random_uv_gen_3d &ruvg) const { @@ -16,6 +17,7 @@ bool material_diffuse_lambertian::scatter(ray3d &r, const object &hit_obj, doubl r.decay(albedo); // lose some light when diffused r.source(hit_point); r.direction((diffuse_target - hit_point).unit_vec()); // the new diffused ray we trace on + TRACELOG(" reflected (diffusive, lambertian material)\n"); return true; } @@ -52,6 +54,7 @@ bool material_diffuse_simple::scatter(ray3d &r, const object &hit_obj, double hi r.decay(albedo); // lose some light when diffused r.source(hit_point); r.direction((diffuse_target - hit_point).unit_vec()); // the new diffused ray we trace on + TRACELOG(" reflected (diffusive, simple material)\n"); return true; } @@ -80,6 +83,7 @@ material_diffuse_hemispherical::scatter(ray3d &r, const object &hit_obj, double r.decay(albedo); // lose some light when diffused r.source(hit_point); r.direction((diffuse_target - hit_point).unit_vec()); // the new diffused ray we trace on + TRACELOG(" reflected (diffusive, hemispherical material)\n"); return true; } |