By Morten S. Mikkelsen; this adds support for tangent bump shading

left: legacy bump, righ: sparkybump

http://pasteall.org/pic/show.php?id=13875

bugs [#26320], [#27506]

there's still an issue with texture OSA as you can see
This commit is contained in:
Daniel Salazar
2011-06-19 20:41:41 +00:00
parent b1b8284f9b
commit dd364944d1

View File

@@ -2620,6 +2620,12 @@ void do_material_tex(ShadeInput *shi)
}
}
}
if ((use_compat_bump || use_ntap_bump) && (shi->mat->mode & MA_TANGENT_V)!=0) {
const float fnegdot = -dot_v3v3(shi->vn, shi->tang);
// apply Gram-Schmidt projection
madd_v3_v3fl(shi->tang, shi->vn, fnegdot);
normalize_v3(shi->tang);
}
}