Cleanup: use normalize_v#_length
[blender.git] / source / blender / render / intern / source / render_texture.c
index dc22859bdc1a8bc6c320bb6a5a38e82be2d5243e..513cfa6df7de585c219403f1786c0caf14bb8745 100644 (file)
@@ -2495,8 +2495,7 @@ void do_material_tex(ShadeInput *shi, Render *re)
                                                        /* can be optimized... (ton) */
                                                        mul_mat3_m4_v3(shi->obr->ob->obmat, texres.nor);
                                                        mul_mat3_m4_v3(re->viewmat, texres.nor);
-                                                       normalize_v3(texres.nor);
-                                                       mul_v3_fl(texres.nor, len);
+                                                       normalize_v3_length(texres.nor, len);
                                                }
                                        }
                                }