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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user