Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-09-02 18:50:30 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-09-05 11:20:43 +0300
commit7f682dd7040e1abacf591b00bfb03fc590493e54 (patch)
tree700b824e75147d58057efb252a6001caee8e469e
parent3b52c4056aafe8267feb45b934e02d5047bb8179 (diff)
Fix T49226: Incorrect Material viewport shading of Cycles Normal Map node in Edit mode for an object with Array modifier
Was incorrect indexing done in the array. Caused by 5abae51. Not sure why it needed to be changed here, but array here is supposed to be a loop data, so bringing back loop index as it originally was. The shading was wrong in edit mode with BI active as well (so it's not like it's needed for BI only). Patch in collaboration with Alexander Gavrilov (angavrilov), thanks! Should be double-checked and ported to 2.78.
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 293309cba76..ad3c4f81438 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -3836,7 +3836,7 @@ void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert,
for (b = 0; b < attribs->tottang; b++) {
if (attribs->tang[b].array) {
/*const*/ float (*array)[4] = attribs->tang[b].array;
- const float *tang = (array) ? array[a * 4 + vert] : zero;
+ const float *tang = (array) ? array[loop] : zero;
glVertexAttrib4fv(attribs->tang[b].gl_index, tang);
}
}