commit e48787810213023deb8ff27058075a83d466e700
Author: Leszek Koltunski <leszek@distorted.org>
Date:   Mon Aug 22 12:15:30 2016 +0100

    Fixes for fragment effects in Effects3D.

diff --git a/src/main/java/org/distorted/library/DistortedObject.java b/src/main/java/org/distorted/library/DistortedObject.java
index e111e20..2222406 100644
--- a/src/main/java/org/distorted/library/DistortedObject.java
+++ b/src/main/java/org/distorted/library/DistortedObject.java
@@ -571,7 +571,8 @@ public abstract class DistortedObject
  * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
  *        
  * @param blend  1-dimensional Data that returns the level of blend a given pixel will be
- *               mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color
+ *               mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color.
+ *               Valid range: <0,1>
  * @param color  Color to mix. (1,0,0) is RED.
  * @param region Region this Effect is limited to.
  * @param smooth If true, the level of 'blend' will smoothly fade out towards the edges of the region.
@@ -587,7 +588,8 @@ public abstract class DistortedObject
  * Makes the whole Object smoothly change all three of its RGB components.
  *
  * @param blend  1-dimensional Data that returns the level of blend a given pixel will be
- *               mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color
+ *               mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color.
+ *               Valid range: <0,1>
  * @param color  Color to mix. (1,0,0) is RED.
  * @return       ID of the effect added, or -1 if we failed to add one.
  */
@@ -601,7 +603,8 @@ public abstract class DistortedObject
  * Makes a certain sub-region of the Object smoothly change its transparency level.
  *        
  * @param alpha  1-dimensional Data that returns the level of transparency we want to have at any given
- *               moment.
+ *               moment: pixel.a *= alpha.
+ *               Valid range: <0,1>
  * @param region Region this Effect is limited to. 
  * @param smooth If true, the level of 'alpha' will smoothly fade out towards the edges of the region.
  * @return       ID of the effect added, or -1 if we failed to add one. 
@@ -616,7 +619,8 @@ public abstract class DistortedObject
  * Makes the whole Object smoothly change its transparency level.
  *
  * @param alpha  1-dimensional Data that returns the level of transparency we want to have at any
- *               given moment.
+ *               given moment: pixel.a *= alpha.
+ *               Valid range: <0,1>
  * @return       ID of the effect added, or -1 if we failed to add one.
  */
   public long alpha(Data1D alpha)
@@ -629,7 +633,7 @@ public abstract class DistortedObject
  * Makes a certain sub-region of the Object smoothly change its brightness level.
  *        
  * @param brightness 1-dimensional Data that returns the level of brightness we want to have
- *                   at any given moment.
+ *                   at any given moment. Valid range: <0,infinity)
  * @param region     Region this Effect is limited to.
  * @param smooth     If true, the level of 'brightness' will smoothly fade out towards the edges of the region.
  * @return           ID of the effect added, or -1 if we failed to add one.
@@ -644,7 +648,7 @@ public abstract class DistortedObject
  * Makes the whole Object smoothly change its brightness level.
  *
  * @param brightness 1-dimensional Data that returns the level of brightness we want to have
- *                   at any given moment.
+ *                   at any given moment. Valid range: <0,infinity)
  * @return           ID of the effect added, or -1 if we failed to add one.
  */
   public long brightness(Data1D brightness)
@@ -657,7 +661,7 @@ public abstract class DistortedObject
  * Makes a certain sub-region of the Object smoothly change its contrast level.
  *        
  * @param contrast 1-dimensional Data that returns the level of contrast we want to have
- *                 at any given moment.
+ *                 at any given moment. Valid range: <0,infinity)
  * @param region   Region this Effect is limited to.
  * @param smooth   If true, the level of 'contrast' will smoothly fade out towards the edges of the region.
  * @return         ID of the effect added, or -1 if we failed to add one.
@@ -672,7 +676,7 @@ public abstract class DistortedObject
  * Makes the whole Object smoothly change its contrast level.
  *
  * @param contrast 1-dimensional Data that returns the level of contrast we want to have
- *                 at any given moment.
+ *                 at any given moment. Valid range: <0,infinity)
  * @return         ID of the effect added, or -1 if we failed to add one.
  */
   public long contrast(Data1D contrast)
@@ -685,7 +689,7 @@ public abstract class DistortedObject
  * Makes a certain sub-region of the Object smoothly change its saturation level.
  *        
  * @param saturation 1-dimensional Data that returns the level of saturation we want to have
- *                   at any given moment.
+ *                   at any given moment. Valid range: <0,infinity)
  * @param region     Region this Effect is limited to.
  * @param smooth     If true, the level of 'saturation' will smoothly fade out towards the edges of the region.
  * @return           ID of the effect added, or -1 if we failed to add one.
@@ -700,7 +704,7 @@ public abstract class DistortedObject
  * Makes the whole Object smoothly change its saturation level.
  *
  * @param saturation 1-dimensional Data that returns the level of saturation we want to have
- *                   at any given moment.
+ *                   at any given moment. Valid range: <0,infinity)
  * @return           ID of the effect added, or -1 if we failed to add one.
  */
   public long saturation(Data1D saturation)
