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 /vec.h | |
parent | 52d11df35ca9846085b910e2e40434b48847d9d8 (diff) |
Move trace logging to tracelog.h.
Pixel-wise, comprehensive, beautiful trace logging.
Diffstat (limited to 'vec.h')
-rw-r--r-- | vec.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -10,6 +10,7 @@ #include <ostream> #include <cassert> #include <algorithm> +#include "tracelog.h" static inline bool eq(int a, int b) { return a == b; @@ -134,8 +135,10 @@ struct vec3 { // TODO test TIR if (Enable_TIR) { // ri_inv < sin(a1), cannot refract, must reflect (Total Internal Reflection) + TRACELOG(" reflect (TIR, d=%f)\n", d); return reflect(r1); } else { + TRACELOG(" refract (forced, d=%f)\n", d); d = -d; // abs, just make the sqrt has a real solution } } |