Merge with trunk r37546
[blender-staging.git] / source / blender / render / intern / source / render_texture.c
index 1c84f9f0e0122ba8e4c836c6549bf95427cf9d06..72ed7165d5e674b4fd969c4b15590c83b5996a60 100644 (file)
@@ -2207,6 +2207,7 @@ void do_material_tex(ShadeInput *shi)
                                }
                        }
                        else if(mtex->texco==TEXCO_REFL) {
                                }
                        }
                        else if(mtex->texco==TEXCO_REFL) {
+                               calc_R_ref(shi);
                                co= shi->ref; dx= shi->dxref; dy= shi->dyref;
                        }
                        else if(mtex->texco==TEXCO_NORM) {
                                co= shi->ref; dx= shi->dxref; dy= shi->dyref;
                        }
                        else if(mtex->texco==TEXCO_NORM) {
@@ -2524,9 +2525,6 @@ void do_material_tex(ShadeInput *shi)
                                        shi->orn[0]= -shi->vn[0];
                                        shi->orn[1]= -shi->vn[1];
                                        shi->orn[2]= -shi->vn[2];
                                        shi->orn[0]= -shi->vn[0];
                                        shi->orn[1]= -shi->vn[1];
                                        shi->orn[2]= -shi->vn[2];
-                                       
-                                       /* reflection vector */
-                                       calc_R_ref(shi);
                                }
                        }
 
                                }
                        }