Support multiple tangents for BI render & viewport
Normal Map node support for GLSL mode and the internal render (multiple tangents support). The Normal Map node is a useful node which is present in the Cycles render. It makes it possible to use normal mapping without additional material node in a node tree. This patch implements Normal Map node for GLSL mode and the internal render. Previously only the active UV layer was used to calculate tangents.
This commit is contained in:

committed by
Campbell Barton

parent
98babfa2b8
commit
5abae51a6e
@@ -962,7 +962,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
|
||||
if (CustomData_get_layer_index(&dm->faceData, CD_TANGENT) == -1) {
|
||||
bool generate_data = false;
|
||||
if (CustomData_get_layer_index(&dm->loopData, CD_TANGENT) == -1) {
|
||||
DM_calc_loop_tangents(dm);
|
||||
DM_calc_loop_tangents(dm, true, NULL, 0);
|
||||
generate_data = true;
|
||||
}
|
||||
DM_generate_tangent_tessface_data(dm, generate_data);
|
||||
|
Reference in New Issue
Block a user