Open brabbitdousha opened 1 year ago
void dda_unit(vec3 cen, vec3 invdir, out float tmax) { float t1, t2; tmax = 1e9f; for (int i = 0; i < 3; ++i) { t1 = - cen[i] * invdir[i]; t2 = t1 + invdir[i]; tmax = min(tmax, max(t1, t2)); } }
I may have trouble understanding it...could you help me..many thanks!.. It looks like the t1 is trying to go back to the origin...
I had the same question. Do you understand?
I may have trouble understanding it...could you help me..many thanks!.. It looks like the t1 is trying to go back to the origin...