Dynamic Paint:
[blender.git] / source / blender / render / intern / source / shadeinput.c
index eab66aaf2ec166fbb16480bba7d4c68e94c86a21..5ef340be89b7c024909b32d8bd2dc65fb9c0781e 100644 (file)
@@ -473,17 +473,20 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
                                        scol->col[0]= cp[3]/255.0f;
                                        scol->col[1]= cp[2]/255.0f;
                                        scol->col[2]= cp[1]/255.0f;
+                                       scol->col[3]= cp[0]/255.0f;
                                }
 
                                if(shi->totcol) {
                                        shi->vcol[0]= shi->col[shi->actcol].col[0];
                                        shi->vcol[1]= shi->col[shi->actcol].col[1];
                                        shi->vcol[2]= shi->col[shi->actcol].col[2];
+                                       shi->vcol[3]= shi->col[shi->actcol].col[3];
                                }
                                else {
                                        shi->vcol[0]= 0.0f;
                                        shi->vcol[1]= 0.0f;
                                        shi->vcol[2]= 0.0f;
+                                       shi->vcol[3]= 0.0f;
                                }
                        }
 
@@ -516,6 +519,7 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
                                                shi->vcol[0]= 1.0f;
                                                shi->vcol[1]= 1.0f;
                                                shi->vcol[2]= 1.0f;
+                                               shi->vcol[3]= 1.0f;
                                        }
                                }
                        }
@@ -532,6 +536,7 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
                                        shi->vcol[0]= 1.0f;
                                        shi->vcol[1]= 1.0f;
                                        shi->vcol[2]= 1.0f;
+                                       shi->vcol[3]= 1.0f;
                                }
                        }
 
@@ -1111,13 +1116,14 @@ void shade_input_set_shade_texco(ShadeInput *shi)
                                        scol->col[0]= (l*((float)cp3[3]) - u*((float)cp1[3]) - v*((float)cp2[3]))/255.0f;
                                        scol->col[1]= (l*((float)cp3[2]) - u*((float)cp1[2]) - v*((float)cp2[2]))/255.0f;
                                        scol->col[2]= (l*((float)cp3[1]) - u*((float)cp1[1]) - v*((float)cp2[1]))/255.0f;
+                                       scol->col[3]= (l*((float)cp3[0]) - u*((float)cp1[0]) - v*((float)cp2[0]))/255.0f;
                                }
 
                                if(shi->totcol) {
                                        shi->vcol[0]= shi->col[shi->actcol].col[0];
                                        shi->vcol[1]= shi->col[shi->actcol].col[1];
                                        shi->vcol[2]= shi->col[shi->actcol].col[2];
-                                       shi->vcol[3]= 1.0f;
+                                       shi->vcol[3]= shi->col[shi->actcol].col[3];
                                }
                                else {
                                        shi->vcol[0]= 0.0f;