summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
74b5bd5)
was transformed by M which apparently was wrong :)
*dist = t_min;
}
if (normal) {
*dist = t_min;
}
if (normal) {
if (min_all.x > min_all.y) {
if (min_all.x > min_all.z) {
if (min_all.x > min_all.y) {
if (min_all.x > min_all.z) {
- norm.x = t2.x < t1.x ? 1 : -1;
+ normal->x = t2.x < t1.x ? 1 : -1;
- norm.z = t2.z < t1.z ? 1 : -1;
+ normal->z = t2.z < t1.z ? 1 : -1;
}
} else if (min_all.y > min_all.z) {
}
} else if (min_all.y > min_all.z) {
- norm.y = t2.y < t1.y ? 1 : -1;
+ normal->y = t2.y < t1.y ? 1 : -1;
- norm.z = t2.z < t1.z ? 1 : -1;
+ normal->z = t2.z < t1.z ? 1 : -1;
- norm = M * norm;
- *normal = glm::vec3(norm);