From 60d8221109304bc4f207dda8a42623cae488af5d Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 16 Apr 2022 19:08:28 +0800 Subject: Move trace logging to tracelog.h. Pixel-wise, comprehensive, beautiful trace logging. --- vec.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vec.h') diff --git a/vec.h b/vec.h index d2dece0..e3e15b8 100644 --- a/vec.h +++ b/vec.h @@ -10,6 +10,7 @@ #include #include #include +#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 } } -- cgit v1.2.3