Dynamic Paint:
authorMiika Hamalainen <blender@miikah.org>
Sun, 24 Jul 2011 17:40:02 +0000 (17:40 +0000)
committerMiika Hamalainen <blender@miikah.org>
Sun, 24 Jul 2011 17:40:02 +0000 (17:40 +0000)
* Forgot to change node socket ids.
* Fixed "shrink" effect artifacts on wetmap.

There was a typo in previous commit message. Should be "alpha support for vertex color rendering".

source/blender/blenkernel/intern/dynamicpaint.c
source/blender/nodes/intern/SHD_util.h

index ab0e7f8a90d98908c85067ea5d21103786ce7405..824ea009a0c8086ae0f02c438e2ea254dfff8cf9 100644 (file)
@@ -3822,18 +3822,14 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force
                                w_factor = (1.0f - ePoint->wetness)/8 * (pPoint->wetness - ePoint->wetness) * speed_scale;
                                if (w_factor < 0.0f) w_factor = 0.0f;
 
-                               if (a_factor) {
-                                       pPoint->alpha -= a_factor;
-                                       if (pPoint->alpha < 0.0f) pPoint->alpha = 0.0f;
-                                       pPoint->wetness -= a_factor;
+                               pPoint->alpha -= a_factor;
+                               if (pPoint->alpha < 0.0f) pPoint->alpha = 0.0f;
 
-                               }
-                               else {
-                                       pPoint->e_alpha -= ea_factor;
-                                       if (pPoint->e_alpha < 0.0f) pPoint->e_alpha = 0.0f;
-                                       pPoint->wetness -= w_factor;
-                                       if (pPoint->wetness < 0.0f) pPoint->wetness = 0.0f;
-                               }
+                               pPoint->e_alpha -= ea_factor;
+                               if (pPoint->e_alpha < 0.0f) pPoint->e_alpha = 0.0f;
+
+                               pPoint->wetness -= w_factor;
+                               if (pPoint->wetness < 0.0f) pPoint->wetness = 0.0f;
                        }
                }
        }
index d137b1d7d87f2beeca921f02fd25ccd64222e213..583810565b2affe53346b4072a4276851b443d9a 100644 (file)
@@ -93,8 +93,8 @@ typedef struct ShaderCallData {
 #define GEOM_OUT_UV            4
 #define GEOM_OUT_NORMAL        5
 #define GEOM_OUT_VCOL  6
-#define GEOM_OUT_FRONTBACK     7
-#define GEOM_OUT_VCOL_ALPHA    8
+#define GEOM_OUT_VCOL_ALPHA    7
+#define GEOM_OUT_FRONTBACK     8
 
 
 /* input socket defines */