Commit 005b16ee authored by Alexandre Prokoudine's avatar Alexandre Prokoudine
Browse files

Revert "Resurrect previous version of the linear light formula and fix it"

This reverts commit 1366592f.
parent 1366592f
......@@ -1782,14 +1782,7 @@ blendfun_linear_light (const float *dest,
for (c = 0; c < 3; c++)
{
gfloat comp;
if (src[c] <= 0.5f)
{
comp = dest[c] + 2.0 * src[c] - 1.0f;
}
else
{
comp = dest[c] + 2.0 * (src[c] - 0.5f);
}
comp = dest[c] + 2.0f * src[c] - 1.0f;
out[c] = comp;
}
}
......@@ -1971,94 +1964,117 @@ static GimpLayerModeInfo gimp_layer_mode_infos[]=
{ GIMP_LAYER_MODE_NORMAL,
"gimp:normal",
0,
GIMP_LAYER_COMPOSITE_SRC_OVER,
},
{ GIMP_LAYER_MODE_DISSOLVE,
"gimp:dissolve",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_OVER,
},
{ GIMP_LAYER_MODE_BEHIND,
"gimp:behind",
0,
GIMP_LAYER_COMPOSITE_DST_ATOP,
},
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY,
"gimp:multiply-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_SCREEN_LEGACY,
"gimp:screen-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_OVERLAY_LEGACY,
"gimp:overlay-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_DIFFERENCE_LEGACY,
"gimp:difference-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_ADDITION_LEGACY,
"gimp:addition-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_SUBTRACT_LEGACY,
"gimp:subtract-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY,
"gimp:darken-only-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY,
"gimp:lighten-only-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_HSV_HUE_LEGACY,
"gimp:hsv-hue-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_HSV_SATURATION_LEGACY,
"gimp:hsv-saturation-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_HSV_COLOR_LEGACY,
"gimp:hsv-color-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_HSV_VALUE_LEGACY,
"gimp:hsv-value-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_DIVIDE_LEGACY,
"gimp:divide-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_DODGE_LEGACY,
"gimp:dodge-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_BURN_LEGACY,
"gimp:burn-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_HARDLIGHT_LEGACY,
"gimp:hardlight-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_SOFTLIGHT_LEGACY,
"gimp:softlight-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY,
"gimp:grain-extract-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY,
"gimp:grain-merge-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_COLOR_ERASE,
"gimp:color-erase",
0,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
},
{ GIMP_LAYER_MODE_OVERLAY,
"gimp:layer-mode",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment