Dynapaint: fix use of normal normalization in dynamicPaint_generateBakeData().
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 19 May 2016 12:06:46 +0000 (14:06 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 19 May 2016 12:44:37 +0000 (14:44 +0200)
commit4b810127ba0de75e9e81b3b6019c86da73f8c63b
tree154cd1159bb04aa637dc9f19830d0ee19486544c
parentc9f1ed1e4c22728b1f711656ab4de56c11c65e35
Dynapaint: fix use of normal normalization in dynamicPaint_generateBakeData().

Vertex's normal is always normalized - and its conversion from short to float should not change that!
On the other hand, linear interpolation of three normals **does not give a normalized vector**
(unless all three inputs are exactly the same).

Also, minor optimization, avoid recomputing that interpolated normal twice for each PaintUVPoint.
source/blender/blenkernel/intern/dynamicpaint.c