BaseCurveEffect applies piecewise linear curve to each channel.
The parameters: Curve0, Curve1, Curve2 and Curve3 are the curves for the corresponding channels.
The possible values for the parameters are:
empty: no curve (identity)
array of floating point values (can be VT_R4, VT_R8, or VT_VARIANT resolving to VT_R4 or VT_R8), up to the maximal texture size limit (N x 1) of the card (i.e., min(d3dCaps.MaxTextureWidth, d3dCaps.MaxTextureAspectRatio), normally 2048 or 4096)
specifies a curve sampled at equal distance between 0 and 1 (inclusive); as a special case, array of size 1 means a constant curve and an array of size 0 means identity;
the values can be outide of [0, 1] range;
a 2d array of floats [2 x point count], so that each point is represented by a pair (x, y);
the first value of every pair (x) should be in [0, 1] range;
x cannot repeat in any two pairs;
it is recommended to have (x, y) pairs sorted by x.
As usual, a float in an array can be VT_R4, VT_R8, or VT_VARIANT resolving to VT_R4 or VT_R8.
A single-dimensional array is significantly faster as long as array size is the same for all channels (not counting channels with identity curve), because it causes an effect to generate exact small lookup table of the size of an array.
If the input color value is in extended range (i.e., not in [0, 1] range), it is linearly extrapolated using the closest two specified points. If you don't need this support (but your input format can support extended range), for perf optimization, set kszExtendedRangePropertyName ("effect.extendedrange") property on this effect to keStandardRange.
This effect is used by ContrastEffect, ColorExposureEffect, ExposureEffect and ColorTemperatureEffect (via ColorExposureEffect) and possibly many other effects.