From 8bd6afc9d952357732d70d3e6c00d8bd2ddf3793 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 01/11] Show Color before Color Wheel in Add Generator --- CHANGELOG.md | 2 +- src/core/SourceTypes.h | 5 +++-- tests/TestSourceTypes.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de7ecbd..41dc07b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ New: -- Add generators, sources drawn by the graphics card: Checker, Grid, Color Wheel and Color, in File > Add Generator or with the generator button of the toolbar, which replaces the color button. Each has its own settings. Its image is square: its resolution is chosen among presets, from 256 × 256 to 4096 × 4096, or typed; a graphics card that cannot draw that large draws the largest it can. The image is drawn once per frame, whatever the number of views that show it. +- Add generators, sources drawn by the graphics card: Checker, Grid and Color, to fit shapes to surfaces, then Color Wheel, in File > Add Generator or with the generator button of the toolbar, which replaces the color button. Each has its own settings. Its image is square: its resolution is chosen among presets, from 256 × 256 to 4096 × 4096, or typed; a graphics card that cannot draw that large draws the largest it can. The image is drawn once per frame, whatever the number of views that show it. - Color Wheel draws colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, over its whole image, from one set of settings, without modes: segments around the circle, rings along the radius, a twist that winds the segments into spirals, a smoothness, a palette chosen among presets, a hue shift, radial saturation and lightness, a rotation in revolutions per minute that never jumps when its speed changes, and a flow that moves the rings away from the centre or towards it, in radii per minute, at the same speed whatever their number. Presets set the geometry. - A color is now a generator: its layers have an input shape, like those of an image, and its image is 256 × 256 by default. Projects with the color sources of earlier versions open with color generators and look the same: the alpha of their color, which was not drawn, is dropped. The MCP tool `create_color_source` creates a color generator. - Checker, Grid and Color Wheel are shader files in the ISF format, shipped in the folder `shaders` of MapMap: editing one changes the generator at the next start. MapMap reads ISF generators of one pass, adds a few keys of its own and of MadMapper to say how their settings are shown, and the time bases and animators of MadMapper to keep their animations from jumping, and lists each shipped shader in File > Add Generator. Projects with the generators of earlier versions open as before. See `docs/extensions/isf.md`. diff --git a/src/core/SourceTypes.h b/src/core/SourceTypes.h index e625d4a0..4a8a2fe9 100644 --- a/src/core/SourceTypes.h +++ b/src/core/SourceTypes.h @@ -35,10 +35,11 @@ namespace mmp { class Source; /// Ranks of the shipped generators in the Add Generator menu; the others come after them. +/// The tools to fit shapes to surfaces come first, then the patterns to show. const int CHECKER_MENU_ORDER = 10; const int GRID_MENU_ORDER = 20; -const int COLOR_WHEEL_MENU_ORDER = 30; -const int COLOR_MENU_ORDER = 40; +const int COLOR_MENU_ORDER = 30; +const int COLOR_WHEEL_MENU_ORDER = 40; const int OTHER_GENERATORS_MENU_ORDER = 100; /** diff --git a/tests/TestSourceTypes.cpp b/tests/TestSourceTypes.cpp index 4c481da4..7a3579db 100644 --- a/tests/TestSourceTypes.cpp +++ b/tests/TestSourceTypes.cpp @@ -77,12 +77,12 @@ void TestSourceTypes::builtinTypesAreRegistered() QCOMPARE(registry.find("Camera")->kind, SourceTypeInfo::Video); QCOMPARE(registry.find("Image")->kind, SourceTypeInfo::Image); - // The generators, in the order of their menu. + // The generators, in the order of their menu: the tools to fit shapes, then the patterns. QStringList generators; for (const SourceTypeInfo* type : registry.types(SourceTypeInfo::Generator)) generators << type->id; QCOMPARE(generators, QStringList({ "mapmap.shaders:checker.fs", "mapmap.shaders:grid.fs", - "mapmap.shaders:color-wheel.fs", ProjectTypes::COLOR_GENERATOR })); + ProjectTypes::COLOR_GENERATOR, "mapmap.shaders:color-wheel.fs" })); // The colour keeps its shortcut. QCOMPARE(registry.find("ColorGenerator")->shortcut, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_A)); From 330aca4ed3159497333c895f97497dfb39344ad9 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 02/11] Add the unit per minute, and give it to the flow of Color Wheel --- docs/extensions/isf.md | 2 +- resources/shaders/color-wheel.fs | 1 + src/core/IsfShader.cpp | 1 + src/core/Setting.h | 5 +++-- src/core/SettingJson.cpp | 1 + src/gui/inspector/SettingFormat.cpp | 1 + tests/TestGenerators.cpp | 3 +++ tests/TestIsfShader.cpp | 4 +++- tests/TestSettingFormat.cpp | 7 +++++++ 9 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/extensions/isf.md b/docs/extensions/isf.md index dbf38983..fcc95a3c 100644 --- a/docs/extensions/isf.md +++ b/docs/extensions/isf.md @@ -98,7 +98,7 @@ A group is shown unfolded. The key `GROUPS` of the header, which MadMapper does | Key | Meaning | |---|---| | `DESCRIPTION` | One sentence saying what the setting does, shown in its tooltip. | -| `UNIT` | `percent` (a value from 0 to 1, shown from 0 to 100), `degrees`, `hertz`, `seconds`, `pixels` or `rpm` (revolutions per minute). | +| `UNIT` | `percent` (a value from 0 to 1, shown from 0 to 100), `degrees`, `hertz`, `seconds`, `pixels`, `rpm` (revolutions per minute) or `per_minute` (shown "/min": how many times something that does not turn, such as a stripe going by, repeats in a minute). | | `STEP` | The increment of the slider and of the arrow keys. | | `SLIDER_MIN`, `SLIDER_MAX` | The ends of the slider, when they differ from `MIN` and `MAX`. Without `MAX`, larger values can be typed. | diff --git a/resources/shaders/color-wheel.fs b/resources/shaders/color-wheel.fs index a51544d3..4342b789 100644 --- a/resources/shaders/color-wheel.fs +++ b/resources/shaders/color-wheel.fs @@ -129,6 +129,7 @@ "MAX": 120.0, "DEFAULT": 5.0, "STEP": 0.1, + "UNIT": "per_minute", "DESCRIPTION": "How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still." }, { diff --git a/src/core/IsfShader.cpp b/src/core/IsfShader.cpp index 02b2b75d..34864b69 100644 --- a/src/core/IsfShader.cpp +++ b/src/core/IsfShader.cpp @@ -84,6 +84,7 @@ const UnitName UNIT_NAMES[] = { { "seconds", SettingInfo::Seconds }, { "pixels", SettingInfo::Pixels }, { "rpm", SettingInfo::RevolutionsPerMinute }, + { "per_minute", SettingInfo::PerMinute }, }; /// Returns true when name is one of the names of a list. diff --git a/src/core/Setting.h b/src/core/Setting.h index bd426f90..5a715ace 100644 --- a/src/core/Setting.h +++ b/src/core/Setting.h @@ -60,8 +60,9 @@ class SettingInfo { /// What kind of value a setting holds. enum Type { Number, Integer, Boolean, Color, Text, Choice, Point, Range, Reference }; - /// The unit of a value, which lets interfaces format it. - enum Unit { NoUnit, Percent, Degrees, Hertz, Seconds, Pixels, RevolutionsPerMinute }; + /// The unit of a value, which lets interfaces format it. PerMinute counts something that + /// repeats without turning, such as stripes going by. + enum Unit { NoUnit, Percent, Degrees, Hertz, Seconds, Pixels, RevolutionsPerMinute, PerMinute }; /// A real number, kept as a double. static SettingInfo number(const QString& id, const QString& label); diff --git a/src/core/SettingJson.cpp b/src/core/SettingJson.cpp index 14d09da7..8c67a402 100644 --- a/src/core/SettingJson.cpp +++ b/src/core/SettingJson.cpp @@ -57,6 +57,7 @@ QString unitName(SettingInfo::Unit unit) case SettingInfo::Seconds: return QStringLiteral("seconds"); case SettingInfo::Pixels: return QStringLiteral("pixels"); case SettingInfo::RevolutionsPerMinute: return QStringLiteral("rpm"); + case SettingInfo::PerMinute: return QStringLiteral("per_minute"); } return QString(); } diff --git a/src/gui/inspector/SettingFormat.cpp b/src/gui/inspector/SettingFormat.cpp index 6e114202..816db724 100644 --- a/src/gui/inspector/SettingFormat.cpp +++ b/src/gui/inspector/SettingFormat.cpp @@ -73,6 +73,7 @@ QString unitSymbol(SettingInfo::Unit unit) case SettingInfo::Seconds: return QStringLiteral("s"); case SettingInfo::Pixels: return QStringLiteral("px"); case SettingInfo::RevolutionsPerMinute: return QStringLiteral("rpm"); + case SettingInfo::PerMinute: return QStringLiteral("/min"); case SettingInfo::NoUnit: break; } return QString(); diff --git a/tests/TestGenerators.cpp b/tests/TestGenerators.cpp index 5394cd2b..0f0b500d 100644 --- a/tests/TestGenerators.cpp +++ b/tests/TestGenerators.cpp @@ -243,6 +243,9 @@ void TestGenerators::generatorsDeclareTheirSettings() "radial_falloff", "radial_reverse", "speed", "reverse", "flow", "flow_inward" }; QCOMPARE(leafPaths(wheel), wheelPaths); QCOMPARE(undescribedPaths(wheel), QStringList()); + // It turns in revolutions per minute; its rings go by so many times a minute. + QCOMPARE(wheel.settings()->find("speed")->info().unit(), SettingInfo::RevolutionsPerMinute); + QCOMPARE(wheel.settings()->find("flow")->info().unit(), SettingInfo::PerMinute); ColorGenerator color; const QStringList colorPaths = generator + QStringList { "color" }; diff --git a/tests/TestIsfShader.cpp b/tests/TestIsfShader.cpp index 29574d55..f21b7e45 100644 --- a/tests/TestIsfShader.cpp +++ b/tests/TestIsfShader.cpp @@ -102,7 +102,8 @@ void TestIsfShader::readsMapMapKeys() { "NAME": "blend", "TYPE": "float", "MIN": 0, "MAX": 1, "DEFAULT": 0.25, "UNIT": "percent", "STEP": 0.01, "DESCRIPTION": "How much of each." }, { "NAME": "speed", "TYPE": "float", "MIN": 0, "SLIDER_MAX": 120, "DEFAULT": 5, "UNIT": "rpm" }, - { "NAME": "angle", "TYPE": "float", "UNIT": "degrees" } + { "NAME": "angle", "TYPE": "float", "UNIT": "degrees" }, + { "NAME": "pace", "TYPE": "float", "UNIT": "per_minute" } ] })"); QVERIFY2(shader.isValid(), qPrintable(shader.error())); @@ -116,6 +117,7 @@ void TestIsfShader::readsMapMapKeys() // Without MAX, larger values than the end of the slider can be typed. const SettingInfo& speed = inputOf(shader, "speed")->setting; QCOMPARE(speed.unit(), SettingInfo::RevolutionsPerMinute); + QCOMPARE(inputOf(shader, "pace")->setting.unit(), SettingInfo::PerMinute); QVERIFY(!speed.maximum().isValid()); QCOMPARE(speed.sliderMinimum().toDouble(), 0.0); QCOMPARE(speed.sliderMaximum().toDouble(), 120.0); diff --git a/tests/TestSettingFormat.cpp b/tests/TestSettingFormat.cpp index 22a9313e..c744d641 100644 --- a/tests/TestSettingFormat.cpp +++ b/tests/TestSettingFormat.cpp @@ -74,6 +74,13 @@ void TestSettingFormat::unitsInFrenchAndEnglish() QVERIFY(SettingFormat::parseNumber("12 rpm", rotation, &parsed, ENGLISH)); QCOMPARE(parsed, 12.0); + // Something that repeats, such as stripes going by, without turning. + const SettingInfo pace = SettingInfo::number("p", "P").step(0.1).unit(SettingInfo::PerMinute); + QCOMPARE(SettingFormat::formatNumber(6, pace, ENGLISH), QString("6.0") + NBSP + "/min"); + QCOMPARE(SettingFormat::formatNumber(6, pace, FRENCH), QString("6,0") + NBSP + "/min"); + QVERIFY(SettingFormat::parseNumber("7.5 /min", pace, &parsed, ENGLISH)); + QCOMPARE(parsed, 7.5); + // Pixels are shown without their unit. const SettingInfo pixels = SettingInfo::point("p", "P").unit(SettingInfo::Pixels); QCOMPARE(SettingFormat::formatNumber(120, pixels, ENGLISH), QString("120")); From d73adbcc513e69772416d362bee2c4f658f86db5 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 03/11] Add Gradient, a generator of two or three colours --- CHANGELOG.md | 1 + docs/extensions/isf.md | 2 +- resources/shaders.qrc | 1 + resources/shaders/CREDITS.md | 1 + resources/shaders/gradient.fs | 223 ++++++++++++++++++++++++++++++++++ src/core/ShaderLibrary.cpp | 1 + src/core/ShaderStrings.cpp | 30 +++++ src/core/SourceTypes.h | 1 + tests/TestGenerators.cpp | 202 ++++++++++++++++++++++++++++++ tests/TestGenerators.h | 5 + tests/TestSourceTypes.cpp | 3 +- 11 files changed, 468 insertions(+), 2 deletions(-) create mode 100644 resources/shaders/gradient.fs diff --git a/CHANGELOG.md b/CHANGELOG.md index 41dc07b4..304c3cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ New: - Add generators, sources drawn by the graphics card: Checker, Grid and Color, to fit shapes to surfaces, then Color Wheel, in File > Add Generator or with the generator button of the toolbar, which replaces the color button. Each has its own settings. Its image is square: its resolution is chosen among presets, from 256 × 256 to 4096 × 4096, or typed; a graphics card that cannot draw that large draws the largest it can. The image is drawn once per frame, whatever the number of views that show it. - Color Wheel draws colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, over its whole image, from one set of settings, without modes: segments around the circle, rings along the radius, a twist that winds the segments into spirals, a smoothness, a palette chosen among presets, a hue shift, radial saturation and lightness, a rotation in revolutions per minute that never jumps when its speed changes, and a flow that moves the rings away from the centre or towards it, in radii per minute, at the same speed whatever their number. Presets set the geometry. +- Gradient, a generator of two or three colours, linear, radial, conic or in a diamond, repeated and mirrored, from smooth to sharp bands, with a centre and an angle. It moves along its shape as soon as it is added, at a speed in repeats per minute that never jumps when it changes. A slight dithering hides the steps between colours on a large projection. Its linear and radial forms start from the ISF files of Carter Rosenberg (MIT License), credited in `resources/shaders/CREDITS.md`. - A color is now a generator: its layers have an input shape, like those of an image, and its image is 256 × 256 by default. Projects with the color sources of earlier versions open with color generators and look the same: the alpha of their color, which was not drawn, is dropped. The MCP tool `create_color_source` creates a color generator. - Checker, Grid and Color Wheel are shader files in the ISF format, shipped in the folder `shaders` of MapMap: editing one changes the generator at the next start. MapMap reads ISF generators of one pass, adds a few keys of its own and of MadMapper to say how their settings are shown, and the time bases and animators of MadMapper to keep their animations from jumping, and lists each shipped shader in File > Add Generator. Projects with the generators of earlier versions open as before. See `docs/extensions/isf.md`. - A source that this version cannot open, such as a Syphon source on GNU/Linux or Windows, is kept with its layers: it shows a "missing" image and is saved as it was read, so that it comes back on a computer that can open it. diff --git a/docs/extensions/isf.md b/docs/extensions/isf.md index fcc95a3c..596658cf 100644 --- a/docs/extensions/isf.md +++ b/docs/extensions/isf.md @@ -1,6 +1,6 @@ # ISF shaders in MapMap -MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid and Color Wheel are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. +MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid, Color Wheel and Gradient are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. ## Where the shipped shaders are diff --git a/resources/shaders.qrc b/resources/shaders.qrc index d0428e90..341b7f03 100644 --- a/resources/shaders.qrc +++ b/resources/shaders.qrc @@ -5,6 +5,7 @@ shaders/checker.fs shaders/grid.fs shaders/color-wheel.fs + shaders/gradient.fs shaders/color-adjustment.fs shaders/invert.fs shaders/colorize.fs diff --git a/resources/shaders/CREDITS.md b/resources/shaders/CREDITS.md index 86b68170..297b58fb 100644 --- a/resources/shaders/CREDITS.md +++ b/resources/shaders/CREDITS.md @@ -8,6 +8,7 @@ The shaders of this folder are part of MapMap, under the GNU General Public Lice | `invert.fs` | Channels: RGB Invert by VIDVOX (ISF-Files, MIT License). | | `colorize.fs` | False Color by zoidberg (ISF-Files, MIT License). | | `posterize.fs` | Posterize by VIDVOX and Luminance Posterize by zoidberg (ISF-Files, MIT License), with the conversions between RGB and HSV of Sam Hocevar that the latter gives. | +| `gradient.fs` | Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License). | ## Romain Dura, ISC License diff --git a/resources/shaders/gradient.fs b/resources/shaders/gradient.fs new file mode 100644 index 00000000..68a6e4ea --- /dev/null +++ b/resources/shaders/gradient.fs @@ -0,0 +1,223 @@ +/*{ + "ISFVSN": "2", + "DESCRIPTION": "A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape.", + "CREDIT": "Linear and radial after Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", + "CATEGORIES": ["Generator"], + "INPUTS": [ + { + "NAME": "shape", + "TYPE": "long", + "LABEL": "Geometry/Shape", + "VALUES": [0, 1, 2, 3], + "LABELS": ["Linear", "Radial", "Conic", "Diamond"], + "DEFAULT": 0, + "DESCRIPTION": "Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners." + }, + { + "NAME": "angle", + "TYPE": "float", + "LABEL": "Geometry/Angle", + "MIN": -180.0, + "MAX": 180.0, + "DEFAULT": 0.0, + "STEP": 1.0, + "UNIT": "degrees", + "DESCRIPTION": "The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it." + }, + { + "NAME": "center", + "TYPE": "point2D", + "LABEL": "Geometry/Center", + "MIN": [0.0, 0.0], + "MAX": [1.0, 1.0], + "DEFAULT": [0.5, 0.5], + "DESCRIPTION": "The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it." + }, + { + "NAME": "repeats", + "TYPE": "float", + "LABEL": "Geometry/Repeats", + "MIN": 1.0, + "MAX": 32.0, + "SLIDER_MAX": 16.0, + "DEFAULT": 1.0, + "STEP": 0.1, + "DESCRIPTION": "How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number." + }, + { + "NAME": "mirror", + "TYPE": "bool", + "LABEL": "Geometry/Mirror", + "DEFAULT": true, + "DESCRIPTION": "Each repeat goes from the first colour to the last and back, with no edge between repeats." + }, + { + "NAME": "hardness", + "TYPE": "float", + "LABEL": "Geometry/Hardness", + "MIN": 0.0, + "MAX": 1.0, + "DEFAULT": 0.0, + "STEP": 0.01, + "UNIT": "percent", + "DESCRIPTION": "0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges." + }, + { + "NAME": "color_a", + "TYPE": "color", + "LABEL": "Color/Color A", + "DEFAULT": [0.0, 0.0, 0.0, 1.0], + "DESCRIPTION": "The first colour." + }, + { + "NAME": "color_b", + "TYPE": "color", + "LABEL": "Color/Color B", + "DEFAULT": [1.0, 1.0, 1.0, 1.0], + "DESCRIPTION": "The second colour, the last one with two colours." + }, + { + "NAME": "color_c", + "TYPE": "color", + "LABEL": "Color/Color C", + "DEFAULT": [0.5, 0.5, 0.5, 1.0], + "DESCRIPTION": "The third colour, used with Three Colors." + }, + { + "NAME": "three_colors", + "TYPE": "bool", + "LABEL": "Color/Three Colors", + "DEFAULT": false, + "DESCRIPTION": "Goes from Color A to Color B, then to Color C." + }, + { + "NAME": "swap_colors", + "TYPE": "bool", + "LABEL": "Color/Swap Colors", + "DEFAULT": false, + "DESCRIPTION": "Swaps the first and the last colour." + }, + { + "NAME": "speed", + "TYPE": "float", + "LABEL": "Animation/Speed", + "MIN": 0.0, + "MAX": 120.0, + "DEFAULT": 6.0, + "STEP": 0.1, + "UNIT": "per_minute", + "DESCRIPTION": "How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still." + }, + { + "NAME": "reverse", + "TYPE": "bool", + "LABEL": "Animation/Reverse", + "DEFAULT": false, + "DESCRIPTION": "The gradient moves the other way: towards the centre, or anticlockwise." + } + ], + "GENERATORS": [ + { "NAME": "phase", "TYPE": "animator", "PARAMS": { "shape": "In", "bpm": "speed", "reverse": "reverse" } } + ] +}*/ + +// Written in GLSL 1.20, which MapMap compiles on every platform, the Raspberry Pi included. +// The motion comes from an animator, a fraction of a cycle that wraps around by itself: it +// keeps its precision however long MapMap runs, unlike a time that grows. + +const float PI = 3.14159265359; +const float TWO_PI = 6.28318530718; + +// Distance from the centre at which a radial or diamond gradient has gone through one repeat: +// the middle of each edge of the image when the centre is in the middle. +const float EDGE_DISTANCE = 0.5; + +// A hardness of 1 still blends over this much of a repeat, to keep the bands from flickering +// at their edges. +const float SHARPEST_BLEND = 0.0001; + +// A blend closer than this to 0 or 1 is a plain colour. +const float PLAIN = 0.0001; + +// One step of a colour of 8 bits. +const float COLOR_STEP = 1.0 / 255.0; + +// Turns a point by an angle in radians, clockwise on the image. +vec2 turned(vec2 point, float turn) { + float c = cos(turn); + float s = sin(turn); + return vec2(c * point.x - s * point.y, s * point.x + c * point.y); +} + +// Returns the position of a point along the gradient, 0 at its start and 1 after one repeat. +float positionAlong(vec2 point, vec2 middle, float turn) { + if (shape == 1) + return distance(point, middle) / EDGE_DISTANCE; + if (shape == 2) { + vec2 offset = turned(point - middle, -turn); + // The angle of the centre itself is undefined: take the start. + if (offset == vec2(0.0)) + return 0.0; + return fract(atan(offset.y, offset.x) / TWO_PI); + } + if (shape == 3) { + vec2 offset = turned(point - middle, -turn); + return (abs(offset.x) + abs(offset.y)) / EDGE_DISTANCE; + } + // Linear: from the left edge to the right edge at 0°, through the middle of the image. + vec2 direction = vec2(cos(turn), sin(turn)); + return dot(point - vec2(0.5), direction) + 0.5; +} + +// The constants of interleaved gradient noise (Jorge Jimenez, "Next Generation Post +// Processing in Call of Duty: Advanced Warfare", 2014). +const vec2 DITHER_WEIGHTS = vec2(0.06711056, 0.00583715); +const float DITHER_SCALE = 52.9829189; + +// Interleaved gradient noise: a fixed pattern of small values, from -0.5 to 0.5, that hides +// the steps of a gradient of 8-bit colours, the same at each frame. +float dither(vec2 pixel) { + return fract(DITHER_SCALE * fract(dot(pixel, DITHER_WEIGHTS))) - 0.5; +} + +// Narrows a blend from 0 to 1 around its middle as the hardness grows: plain colours on +// both sides, and a sharp edge at a hardness of 1. +float hardened(float blend) { + float width = max(1.0 - hardness, SHARPEST_BLEND); + return clamp((blend - 0.5) / width + 0.5, 0.0, 1.0); +} + +void main() { + // Counted from the top left, as the center and the angle. + vec2 point = vec2(isf_FragNormCoord.x, 1.0 - isf_FragNormCoord.y); + float turn = radians(angle); + + // A conic gradient repeats a whole number of times, to meet itself around the centre. + float repeatCount = shape == 2 ? max(1.0, floor(repeats + 0.5)) : repeats; + float along = positionAlong(point, center, turn) * repeatCount; + float amount = fract(along - phase); + if (mirror) + amount = 1.0 - abs(2.0 * amount - 1.0); + + // The hardness narrows each blend between two colours around its middle: with three + // colours, each half, so that Color B keeps its band. + vec4 first = swap_colors ? (three_colors ? color_c : color_b) : color_a; + vec4 last = swap_colors ? color_a : (three_colors ? color_c : color_b); + vec4 color; + float blend; + if (three_colors && amount < 0.5) { + blend = hardened(2.0 * amount); + color = mix(first, color_b, blend); + } else if (three_colors) { + blend = hardened(2.0 * amount - 1.0); + color = mix(color_b, last, blend); + } else { + blend = hardened(amount); + color = mix(first, last, blend); + } + + // Only where colours blend: plain bands stay plain. + if (blend > PLAIN && blend < 1.0 - PLAIN) + color.rgb += dither(gl_FragCoord.xy) * COLOR_STEP; + gl_FragColor = color; +} diff --git a/src/core/ShaderLibrary.cpp b/src/core/ShaderLibrary.cpp index ae959783..5b3919a6 100644 --- a/src/core/ShaderLibrary.cpp +++ b/src/core/ShaderLibrary.cpp @@ -52,6 +52,7 @@ const MenuRank SHIPPED_RANKS[] = { { "checker.fs", CHECKER_MENU_ORDER }, { "grid.fs", GRID_MENU_ORDER }, { "color-wheel.fs", COLOR_WHEEL_MENU_ORDER }, + { "gradient.fs", GRADIENT_MENU_ORDER }, }; /// Returns the rank of a shader in the Add Generator menu. diff --git a/src/core/ShaderStrings.cpp b/src/core/ShaderStrings.cpp index 130329e5..76ae7816 100644 --- a/src/core/ShaderStrings.cpp +++ b/src/core/ShaderStrings.cpp @@ -108,6 +108,36 @@ QStringList ShaderLibrary::shippedTexts() QT_TRANSLATE_NOOP("Shaders", "Luminance"), QT_TRANSLATE_NOOP("Shaders", "Maximum"), QT_TRANSLATE_NOOP("Shaders", "Average"), + QT_TRANSLATE_NOOP("Shaders", "Gradient"), + QT_TRANSLATE_NOOP("Shaders", "A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape."), + QT_TRANSLATE_NOOP("Shaders", "Shape"), + QT_TRANSLATE_NOOP("Shaders", "Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners."), + QT_TRANSLATE_NOOP("Shaders", "Linear"), + QT_TRANSLATE_NOOP("Shaders", "Radial"), + QT_TRANSLATE_NOOP("Shaders", "Conic"), + QT_TRANSLATE_NOOP("Shaders", "Diamond"), + QT_TRANSLATE_NOOP("Shaders", "Angle"), + QT_TRANSLATE_NOOP("Shaders", "The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it."), + QT_TRANSLATE_NOOP("Shaders", "Center"), + QT_TRANSLATE_NOOP("Shaders", "The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it."), + QT_TRANSLATE_NOOP("Shaders", "Repeats"), + QT_TRANSLATE_NOOP("Shaders", "How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number."), + QT_TRANSLATE_NOOP("Shaders", "Mirror"), + QT_TRANSLATE_NOOP("Shaders", "Each repeat goes from the first colour to the last and back, with no edge between repeats."), + QT_TRANSLATE_NOOP("Shaders", "Hardness"), + QT_TRANSLATE_NOOP("Shaders", "0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges."), + QT_TRANSLATE_NOOP("Shaders", "Color A"), + QT_TRANSLATE_NOOP("Shaders", "The first colour."), + QT_TRANSLATE_NOOP("Shaders", "Color B"), + QT_TRANSLATE_NOOP("Shaders", "The second colour, the last one with two colours."), + QT_TRANSLATE_NOOP("Shaders", "Color C"), + QT_TRANSLATE_NOOP("Shaders", "The third colour, used with Three Colors."), + QT_TRANSLATE_NOOP("Shaders", "Three Colors"), + QT_TRANSLATE_NOOP("Shaders", "Goes from Color A to Color B, then to Color C."), + QT_TRANSLATE_NOOP("Shaders", "Swap Colors"), + QT_TRANSLATE_NOOP("Shaders", "Swaps the first and the last colour."), + QT_TRANSLATE_NOOP("Shaders", "How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still."), + QT_TRANSLATE_NOOP("Shaders", "The gradient moves the other way: towards the centre, or anticlockwise."), QT_TRANSLATE_NOOP("Shaders", "Grid"), QT_TRANSLATE_NOOP("Shaders", "Lines of a colour on a background, along the borders and between columns and rows."), QT_TRANSLATE_NOOP("Shaders", "Columns"), diff --git a/src/core/SourceTypes.h b/src/core/SourceTypes.h index 4a8a2fe9..3760da42 100644 --- a/src/core/SourceTypes.h +++ b/src/core/SourceTypes.h @@ -40,6 +40,7 @@ const int CHECKER_MENU_ORDER = 10; const int GRID_MENU_ORDER = 20; const int COLOR_MENU_ORDER = 30; const int COLOR_WHEEL_MENU_ORDER = 40; +const int GRADIENT_MENU_ORDER = 50; const int OTHER_GENERATORS_MENU_ORDER = 100; /** diff --git a/tests/TestGenerators.cpp b/tests/TestGenerators.cpp index 0f0b500d..2d2137e3 100644 --- a/tests/TestGenerators.cpp +++ b/tests/TestGenerators.cpp @@ -20,6 +20,7 @@ #include "SourceTypes.h" #include +#include #include #include @@ -77,6 +78,27 @@ const int THREE_TENTHS_RADIUS = CENTRE + 3 * CENTRE / 10; /// Default number of squares of a checker, and of columns and rows of a grid. const int DEFAULT_COUNT = 4; +/// Odd side of the images of the patterns, where rounding would show, its middle pixel, and +/// a quarter of its side. +const int ODD_SIZE = 97; +const int ODD_MIDDLE = ODD_SIZE / 2; +const int ODD_QUARTER = ODD_SIZE / 4; + +/// Largest difference allowed on a colour channel near the end of a smooth gradient, half a +/// pixel from where it has exactly its colour. +const int GRADIENT_TOLERANCE = 8; + +/// The patterns shipped with MapMap, after the tools to fit shapes. +const char* const PATTERN_FILES[] = { "gradient.fs" }; + +/// Default speed of the patterns: one repeat every 10 seconds. +const double DEFAULT_PATTERN_SPEED = 6.0; + +/// Two colours far from black, white and from each other, to tell them apart. +const QColor ORANGE(240, 120, 0); +const QColor TEAL(0, 128, 160); +const QColor PLUM(120, 30, 90); + /// A generator owned by a test. typedef std::unique_ptr GeneratorPtr; @@ -1396,3 +1418,183 @@ void TestGenerators::isfAnimatorTurnsWithoutJumps() QCOMPARE(generator.generatorValue("cycle"), 0.0); QCOMPARE(generator.generatorValue("pulse"), 0.0); } + +namespace { + +/// Returns the number of different colours of an image. +int colorCount(const QImage& image) +{ + QSet colors; + for (int y = 0; y < image.height(); y++) + for (int x = 0; x < image.width(); x++) + colors.insert(image.pixel(x, y)); + return colors.size(); +} + +/// Returns a new gradient of size ODD_SIZE, still, between ORANGE and TEAL. +GeneratorPtr stillGradient() +{ + GeneratorPtr gradient = shipped("gradient.fs"); + gradient->setResolution(ODD_SIZE); + set(*gradient, "speed", 0.0); + set(*gradient, "color_a", ORANGE); + set(*gradient, "color_b", TEAL); + return gradient; +} + +} // namespace + +void TestGenerators::patternsDeclareDescribedSettings() +{ + for (const char* fileName : PATTERN_FILES) + { + GeneratorPtr pattern = shipped(fileName); + QVERIFY2(pattern, fileName); + const IsfGenerator* isf = qobject_cast(pattern.get()); + QVERIFY2(isf, fileName); + QVERIFY2(isf->shader().warnings().isEmpty(), qPrintable(isf->shader().warnings().join("\n"))); + QCOMPARE(undescribedPaths(*pattern), QStringList()); + } +} + +void TestGenerators::patternsMoveByDefault() +{ + for (const char* fileName : PATTERN_FILES) + { + GeneratorPtr pattern = shipped(fileName); + QCOMPARE(pattern->settings()->find("speed")->value().toDouble(), DEFAULT_PATTERN_SPEED); + QCOMPARE(pattern->settings()->find("speed")->info().unit(), SettingInfo::PerMinute); + QVERIFY2(pattern->isAnimated(), fileName); + set(*pattern, "speed", 0.0); + QVERIFY2(!pattern->isAnimated(), fileName); + } +} + +void TestGenerators::gradientDrawsItsShapes() +{ + OffscreenContext gl; + if (!gl.ok) + QSKIP("No desktop OpenGL context available"); + + // Linear at 0°, mirrored: the first colour on the left and right edges, the second in the + // middle. + GeneratorPtr gradient = stillGradient(); + QImage image = drawnImage(*gradient); + QVERIFY(closeColors(image.pixelColor(0, ODD_MIDDLE), ORANGE, GRADIENT_TOLERANCE)); + CHECK_PIXEL(image, ODD_MIDDLE, ODD_MIDDLE, TEAL); + QVERIFY(closeColors(image.pixelColor(ODD_SIZE - 1, ODD_MIDDLE), ORANGE, GRADIENT_TOLERANCE)); + // The same colour down each column, but for the dithering. + CHECK_PIXEL(image, ODD_QUARTER, 0, image.pixelColor(ODD_QUARTER, ODD_SIZE - 1)); + + // Not mirrored: from the first colour on the left to the second on the right. + set(*gradient, "mirror", false); + image = drawnImage(*gradient); + QVERIFY2(closeColors(image.pixelColor(0, ODD_MIDDLE), ORANGE, GRADIENT_TOLERANCE), + qPrintable(colorText(image.pixelColor(0, ODD_MIDDLE)))); + QVERIFY2(closeColors(image.pixelColor(ODD_SIZE - 1, ODD_MIDDLE), TEAL, GRADIENT_TOLERANCE), + qPrintable(colorText(image.pixelColor(ODD_SIZE - 1, ODD_MIDDLE)))); + + // At 90°, from the top to the bottom. + set(*gradient, "angle", 90.0); + image = drawnImage(*gradient); + QVERIFY(closeColors(image.pixelColor(ODD_MIDDLE, 0), ORANGE, GRADIENT_TOLERANCE)); + QVERIFY(closeColors(image.pixelColor(ODD_MIDDLE, ODD_SIZE - 1), TEAL, GRADIENT_TOLERANCE)); + + // Radial: the first colour at the centre, the same colour at the same distance from it. + set(*gradient, "mirror", true); + set(*gradient, "shape", "radial"); + image = drawnImage(*gradient); + CHECK_PIXEL(image, ODD_MIDDLE, ODD_MIDDLE, ORANGE); + CHECK_PIXEL(image, ODD_MIDDLE + ODD_QUARTER, ODD_MIDDLE, image.pixelColor(ODD_MIDDLE, ODD_MIDDLE - ODD_QUARTER)); + QVERIFY(closeColors(image.pixelColor(ODD_MIDDLE + ODD_QUARTER, ODD_MIDDLE), TEAL, GRADIENT_TOLERANCE)); + + // Moved centre: the first colour follows it. + set(*gradient, "center", QPointF(0.25, 0.75)); + image = drawnImage(*gradient); + QVERIFY(closeColors(image.pixelColor(ODD_QUARTER, ODD_SIZE - 1 - ODD_QUARTER), ORANGE, GRADIENT_TOLERANCE)); + set(*gradient, "center", QPointF(0.5, 0.5)); + + // Conic: the same colour along each ray from the centre, another colour on another ray. + set(*gradient, "shape", "conic"); + image = drawnImage(*gradient); + CHECK_PIXEL(image, ODD_MIDDLE + ODD_QUARTER, ODD_MIDDLE - 2, image.pixelColor(ODD_SIZE - 2, ODD_MIDDLE - 4)); + QVERIFY(!closeColors(image.pixelColor(ODD_MIDDLE + ODD_QUARTER, ODD_MIDDLE - 2), + image.pixelColor(ODD_MIDDLE - 2, ODD_MIDDLE + ODD_QUARTER), GRADIENT_TOLERANCE)); + + // Diamond: the same colour along each side of a square on its corner. + set(*gradient, "shape", "diamond"); + image = drawnImage(*gradient); + CHECK_PIXEL(image, ODD_MIDDLE + ODD_QUARTER, ODD_MIDDLE, image.pixelColor(ODD_MIDDLE, ODD_MIDDLE + ODD_QUARTER)); + CHECK_PIXEL(image, ODD_MIDDLE + ODD_QUARTER / 2, ODD_MIDDLE + ODD_QUARTER / 2, + image.pixelColor(ODD_MIDDLE + ODD_QUARTER, ODD_MIDDLE)); + CHECK_PIXEL(image, ODD_MIDDLE, ODD_MIDDLE, ORANGE); +} + +void TestGenerators::gradientBlendsTwoOrThreeColors() +{ + OffscreenContext gl; + if (!gl.ok) + QSKIP("No desktop OpenGL context available"); + + // Three colours, not mirrored: the first on the left, the second in the middle, the third + // on the right. + GeneratorPtr gradient = stillGradient(); + set(*gradient, "mirror", false); + set(*gradient, "three_colors", true); + set(*gradient, "color_c", PLUM); + QImage image = drawnImage(*gradient); + QVERIFY(closeColors(image.pixelColor(0, ODD_MIDDLE), ORANGE, GRADIENT_TOLERANCE)); + CHECK_PIXEL(image, ODD_MIDDLE, ODD_MIDDLE, TEAL); + QVERIFY(closeColors(image.pixelColor(ODD_SIZE - 1, ODD_MIDDLE), PLUM, GRADIENT_TOLERANCE)); + + // Swapped: the last colour comes first. + set(*gradient, "swap_colors", true); + image = drawnImage(*gradient); + QVERIFY(closeColors(image.pixelColor(0, ODD_MIDDLE), PLUM, GRADIENT_TOLERANCE)); + QVERIFY(closeColors(image.pixelColor(ODD_SIZE - 1, ODD_MIDDLE), ORANGE, GRADIENT_TOLERANCE)); + + // Two colours, swapped. + set(*gradient, "three_colors", false); + image = drawnImage(*gradient); + QVERIFY(closeColors(image.pixelColor(0, ODD_MIDDLE), TEAL, GRADIENT_TOLERANCE)); + QVERIFY(closeColors(image.pixelColor(ODD_SIZE - 1, ODD_MIDDLE), ORANGE, GRADIENT_TOLERANCE)); + + // Repeated four times, mirrored: the second colour in the middle of each repeat. + set(*gradient, "swap_colors", false); + set(*gradient, "mirror", true); + set(*gradient, "repeats", 4.0); + image = drawnImage(*gradient); + const int repeatWidth = ODD_SIZE / 4; + for (int repeat = 0; repeat < 4; repeat++) + QVERIFY(closeColors(image.pixelColor(repeat * repeatWidth + repeatWidth / 2, ODD_MIDDLE), TEAL, + 2 * GRADIENT_TOLERANCE)); +} + +void TestGenerators::gradientHardnessGivesPlainBands() +{ + OffscreenContext gl; + if (!gl.ok) + QSKIP("No desktop OpenGL context available"); + + GeneratorPtr gradient = stillGradient(); + set(*gradient, "shape", "radial"); + set(*gradient, "repeats", 3.0); + QVERIFY(colorCount(drawnImage(*gradient)) > 2); + + // Fully hard: nothing but the two colours, whatever the dithering. + set(*gradient, "hardness", 1.0); + const QImage image = drawnImage(*gradient); + QCOMPARE(colorCount(image), 2); + CHECK_PIXEL(image, ODD_MIDDLE, ODD_MIDDLE, ORANGE); + + // Three colours, fully hard: three bands, Color B between the two others. + set(*gradient, "shape", "linear"); + set(*gradient, "repeats", 1.0); + set(*gradient, "three_colors", true); + set(*gradient, "color_c", PLUM); + const QImage threeBands = drawnImage(*gradient); + QCOMPARE(colorCount(threeBands), 3); + CHECK_PIXEL(threeBands, 0, ODD_MIDDLE, ORANGE); + CHECK_PIXEL(threeBands, ODD_QUARTER, ODD_MIDDLE, TEAL); + CHECK_PIXEL(threeBands, ODD_MIDDLE, ODD_MIDDLE, PLUM); +} diff --git a/tests/TestGenerators.h b/tests/TestGenerators.h index 502e1def..df55e874 100644 --- a/tests/TestGenerators.h +++ b/tests/TestGenerators.h @@ -56,6 +56,11 @@ private slots: void isfAnimatorTurnsWithoutJumps(); void shaderLibraryRefusesOnlyTheBadFiles(); void shippedCheckerAndGridDrawAsBefore(); + void patternsDeclareDescribedSettings(); + void patternsMoveByDefault(); + void gradientDrawsItsShapes(); + void gradientBlendsTwoOrThreeColors(); + void gradientHardnessGivesPlainBands(); }; #endif /* TEST_GENERATORS_H_ */ diff --git a/tests/TestSourceTypes.cpp b/tests/TestSourceTypes.cpp index 7a3579db..b1d4f1e2 100644 --- a/tests/TestSourceTypes.cpp +++ b/tests/TestSourceTypes.cpp @@ -82,7 +82,8 @@ void TestSourceTypes::builtinTypesAreRegistered() for (const SourceTypeInfo* type : registry.types(SourceTypeInfo::Generator)) generators << type->id; QCOMPARE(generators, QStringList({ "mapmap.shaders:checker.fs", "mapmap.shaders:grid.fs", - ProjectTypes::COLOR_GENERATOR, "mapmap.shaders:color-wheel.fs" })); + ProjectTypes::COLOR_GENERATOR, "mapmap.shaders:color-wheel.fs", + "mapmap.shaders:gradient.fs" })); // The colour keeps its shortcut. QCOMPARE(registry.find("ColorGenerator")->shortcut, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_A)); From 682da10db4106e7f38fcb1b2a46b77f4308d9edf Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 04/11] Add Stripes, a generator of stripes of two colours --- CHANGELOG.md | 1 + docs/extensions/isf.md | 2 +- resources/shaders.qrc | 1 + resources/shaders/CREDITS.md | 1 + resources/shaders/stripes.fs | 116 +++++++++++++++++++++++++++++++++++ src/core/ShaderLibrary.cpp | 1 + src/core/ShaderStrings.cpp | 11 ++++ src/core/SourceTypes.h | 1 + tests/TestGenerators.cpp | 95 +++++++++++++++++++++++++++- tests/TestGenerators.h | 2 + tests/TestSourceTypes.cpp | 2 +- 11 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 resources/shaders/stripes.fs diff --git a/CHANGELOG.md b/CHANGELOG.md index 304c3cdb..3d30d0ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ New: - Add generators, sources drawn by the graphics card: Checker, Grid and Color, to fit shapes to surfaces, then Color Wheel, in File > Add Generator or with the generator button of the toolbar, which replaces the color button. Each has its own settings. Its image is square: its resolution is chosen among presets, from 256 × 256 to 4096 × 4096, or typed; a graphics card that cannot draw that large draws the largest it can. The image is drawn once per frame, whatever the number of views that show it. - Color Wheel draws colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, over its whole image, from one set of settings, without modes: segments around the circle, rings along the radius, a twist that winds the segments into spirals, a smoothness, a palette chosen among presets, a hue shift, radial saturation and lightness, a rotation in revolutions per minute that never jumps when its speed changes, and a flow that moves the rings away from the centre or towards it, in radii per minute, at the same speed whatever their number. Presets set the geometry. - Gradient, a generator of two or three colours, linear, radial, conic or in a diamond, repeated and mirrored, from smooth to sharp bands, with a centre and an angle. It moves along its shape as soon as it is added, at a speed in repeats per minute that never jumps when it changes. A slight dithering hides the steps between colours on a large projection. Its linear and radial forms start from the ISF files of Carter Rosenberg (MIT License), credited in `resources/shaders/CREDITS.md`. +- Stripes, a generator of stripes of two colours: how many pairs cross the image, their angle, the share of each colour and the softness of their edges in pixels. They go by as soon as they are added, at a speed in pairs per minute. It starts from Stripes of VIDVOX (MIT License). - A color is now a generator: its layers have an input shape, like those of an image, and its image is 256 × 256 by default. Projects with the color sources of earlier versions open with color generators and look the same: the alpha of their color, which was not drawn, is dropped. The MCP tool `create_color_source` creates a color generator. - Checker, Grid and Color Wheel are shader files in the ISF format, shipped in the folder `shaders` of MapMap: editing one changes the generator at the next start. MapMap reads ISF generators of one pass, adds a few keys of its own and of MadMapper to say how their settings are shown, and the time bases and animators of MadMapper to keep their animations from jumping, and lists each shipped shader in File > Add Generator. Projects with the generators of earlier versions open as before. See `docs/extensions/isf.md`. - A source that this version cannot open, such as a Syphon source on GNU/Linux or Windows, is kept with its layers: it shows a "missing" image and is saved as it was read, so that it comes back on a computer that can open it. diff --git a/docs/extensions/isf.md b/docs/extensions/isf.md index 596658cf..63a2c6ba 100644 --- a/docs/extensions/isf.md +++ b/docs/extensions/isf.md @@ -1,6 +1,6 @@ # ISF shaders in MapMap -MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid, Color Wheel and Gradient are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. +MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid, Color Wheel, Gradient and Stripes are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. ## Where the shipped shaders are diff --git a/resources/shaders.qrc b/resources/shaders.qrc index 341b7f03..011aba7a 100644 --- a/resources/shaders.qrc +++ b/resources/shaders.qrc @@ -6,6 +6,7 @@ shaders/grid.fs shaders/color-wheel.fs shaders/gradient.fs + shaders/stripes.fs shaders/color-adjustment.fs shaders/invert.fs shaders/colorize.fs diff --git a/resources/shaders/CREDITS.md b/resources/shaders/CREDITS.md index 297b58fb..688d6001 100644 --- a/resources/shaders/CREDITS.md +++ b/resources/shaders/CREDITS.md @@ -9,6 +9,7 @@ The shaders of this folder are part of MapMap, under the GNU General Public Lice | `colorize.fs` | False Color by zoidberg (ISF-Files, MIT License). | | `posterize.fs` | Posterize by VIDVOX and Luminance Posterize by zoidberg (ISF-Files, MIT License), with the conversions between RGB and HSV of Sam Hocevar that the latter gives. | | `gradient.fs` | Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License). | +| `stripes.fs` | Stripes by VIDVOX (ISF-Files, MIT License). | ## Romain Dura, ISC License diff --git a/resources/shaders/stripes.fs b/resources/shaders/stripes.fs new file mode 100644 index 00000000..952d186b --- /dev/null +++ b/resources/shaders/stripes.fs @@ -0,0 +1,116 @@ +/*{ + "ISFVSN": "2", + "DESCRIPTION": "Stripes of two colours, at any angle and width, going by.", + "CREDIT": "After Stripes by VIDVOX (ISF-Files, MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", + "CATEGORIES": ["Generator"], + "INPUTS": [ + { + "NAME": "count", + "TYPE": "float", + "LABEL": "Geometry/Count", + "MIN": 1.0, + "MAX": 64.0, + "SLIDER_MAX": 32.0, + "DEFAULT": 4.0, + "STEP": 1.0, + "DESCRIPTION": "How many pairs of stripes, one of each colour, cross the image." + }, + { + "NAME": "angle", + "TYPE": "float", + "LABEL": "Geometry/Angle", + "MIN": -180.0, + "MAX": 180.0, + "DEFAULT": 0.0, + "STEP": 1.0, + "UNIT": "degrees", + "DESCRIPTION": "The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright." + }, + { + "NAME": "stripe_width", + "TYPE": "float", + "LABEL": "Geometry/Width", + "MIN": 0.0, + "MAX": 1.0, + "DEFAULT": 0.5, + "STEP": 0.01, + "UNIT": "percent", + "DESCRIPTION": "The share of each pair taken by the stripe of Color A." + }, + { + "NAME": "softness", + "TYPE": "float", + "LABEL": "Geometry/Softness", + "MIN": 0.0, + "MAX": 256.0, + "SLIDER_MAX": 64.0, + "DEFAULT": 1.0, + "STEP": 0.5, + "UNIT": "pixels", + "DESCRIPTION": "How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges." + }, + { + "NAME": "color_a", + "TYPE": "color", + "LABEL": "Color/Color A", + "DEFAULT": [0.0, 0.0, 0.0, 1.0], + "DESCRIPTION": "The colour of every other stripe." + }, + { + "NAME": "color_b", + "TYPE": "color", + "LABEL": "Color/Color B", + "DEFAULT": [1.0, 1.0, 1.0, 1.0], + "DESCRIPTION": "The colour of the stripes between." + }, + { + "NAME": "speed", + "TYPE": "float", + "LABEL": "Animation/Speed", + "MIN": 0.0, + "MAX": 120.0, + "DEFAULT": 6.0, + "STEP": 0.1, + "UNIT": "per_minute", + "DESCRIPTION": "How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still." + }, + { + "NAME": "reverse", + "TYPE": "bool", + "LABEL": "Animation/Reverse", + "DEFAULT": false, + "DESCRIPTION": "The stripes go by the other way." + } + ], + "GENERATORS": [ + { "NAME": "phase", "TYPE": "animator", "PARAMS": { "shape": "In", "bpm": "speed", "reverse": "reverse" } } + ] +}*/ + +// Written in GLSL 1.20, which MapMap compiles on every platform, the Raspberry Pi included. +// The motion comes from an animator, a fraction of a cycle that wraps around by itself: it +// keeps its precision however long MapMap runs, unlike a time that grows. + +void main() { + // Counted from the top left, as the angle. + vec2 point = vec2(isf_FragNormCoord.x, 1.0 - isf_FragNormCoord.y); + float turn = radians(angle); + vec2 across = vec2(cos(turn), sin(turn)); + + // Position across the stripes, in pairs, through the middle of the image. + float position = (dot(point - vec2(0.5), across) + 0.5) * count - phase; + float inPair = fract(position); + + // Distance to the nearest edge, in pairs: positive in a stripe of Color A, negative in + // one of Color B. + float edge = inPair < stripe_width ? min(inPair, stripe_width - inPair) : -min(inPair - stripe_width, 1.0 - inPair); + + // The softness, from pixels of the image to pairs. + float halfBlend = 0.5 * softness * count / RENDERSIZE.x; + float amountA = halfBlend > 0.0 ? smoothstep(-halfBlend, halfBlend, edge) : step(0.0, edge); + if (stripe_width <= 0.0) + amountA = 0.0; + else if (stripe_width >= 1.0) + amountA = 1.0; + gl_FragColor = mix(color_b, color_a, amountA); +} diff --git a/src/core/ShaderLibrary.cpp b/src/core/ShaderLibrary.cpp index 5b3919a6..3fb78ada 100644 --- a/src/core/ShaderLibrary.cpp +++ b/src/core/ShaderLibrary.cpp @@ -53,6 +53,7 @@ const MenuRank SHIPPED_RANKS[] = { { "grid.fs", GRID_MENU_ORDER }, { "color-wheel.fs", COLOR_WHEEL_MENU_ORDER }, { "gradient.fs", GRADIENT_MENU_ORDER }, + { "stripes.fs", STRIPES_MENU_ORDER }, }; /// Returns the rank of a shader in the Add Generator menu. diff --git a/src/core/ShaderStrings.cpp b/src/core/ShaderStrings.cpp index 76ae7816..37d39bca 100644 --- a/src/core/ShaderStrings.cpp +++ b/src/core/ShaderStrings.cpp @@ -177,6 +177,17 @@ QStringList ShaderLibrary::shippedTexts() QT_TRANSLATE_NOOP("Shaders", "Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between."), QT_TRANSLATE_NOOP("Shaders", "Brightness Only"), QT_TRANSLATE_NOOP("Shaders", "Keeps the colours and reduces only their brightness to levels."), + QT_TRANSLATE_NOOP("Shaders", "Stripes"), + QT_TRANSLATE_NOOP("Shaders", "Stripes of two colours, at any angle and width, going by."), + QT_TRANSLATE_NOOP("Shaders", "How many pairs of stripes, one of each colour, cross the image."), + QT_TRANSLATE_NOOP("Shaders", "The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright."), + QT_TRANSLATE_NOOP("Shaders", "Width"), + QT_TRANSLATE_NOOP("Shaders", "The share of each pair taken by the stripe of Color A."), + QT_TRANSLATE_NOOP("Shaders", "How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges."), + QT_TRANSLATE_NOOP("Shaders", "The colour of every other stripe."), + QT_TRANSLATE_NOOP("Shaders", "The colour of the stripes between."), + QT_TRANSLATE_NOOP("Shaders", "How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still."), + QT_TRANSLATE_NOOP("Shaders", "The stripes go by the other way."), QT_TRANSLATE_NOOP("Shaders", "Turns the image into two colours: what is darker than the threshold, and what is lighter."), QT_TRANSLATE_NOOP("Shaders", "Below it a pixel takes the dark colour, above it the light colour."), QT_TRANSLATE_NOOP("Shaders", "The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge."), diff --git a/src/core/SourceTypes.h b/src/core/SourceTypes.h index 3760da42..df2db7ea 100644 --- a/src/core/SourceTypes.h +++ b/src/core/SourceTypes.h @@ -41,6 +41,7 @@ const int GRID_MENU_ORDER = 20; const int COLOR_MENU_ORDER = 30; const int COLOR_WHEEL_MENU_ORDER = 40; const int GRADIENT_MENU_ORDER = 50; +const int STRIPES_MENU_ORDER = 60; const int OTHER_GENERATORS_MENU_ORDER = 100; /** diff --git a/tests/TestGenerators.cpp b/tests/TestGenerators.cpp index 2d2137e3..7b87841b 100644 --- a/tests/TestGenerators.cpp +++ b/tests/TestGenerators.cpp @@ -89,11 +89,14 @@ const int ODD_QUARTER = ODD_SIZE / 4; const int GRADIENT_TOLERANCE = 8; /// The patterns shipped with MapMap, after the tools to fit shapes. -const char* const PATTERN_FILES[] = { "gradient.fs" }; +const char* const PATTERN_FILES[] = { "gradient.fs", "stripes.fs" }; /// Default speed of the patterns: one repeat every 10 seconds. const double DEFAULT_PATTERN_SPEED = 6.0; +/// Seconds in a minute, to give speeds per minute. +const double SECONDS_PER_MINUTE = 60.0; + /// Two colours far from black, white and from each other, to tell them apart. const QColor ORANGE(240, 120, 0); const QColor TEAL(0, 128, 160); @@ -1442,6 +1445,31 @@ GeneratorPtr stillGradient() return gradient; } +/// Returns the number of runs of one colour along a row of an image, or along a column. +int runCount(const QImage& image, int index, bool alongRow) +{ + int runs = 1; + const int length = alongRow ? image.width() : image.height(); + for (int i = 1; i < length; i++) + { + const QRgb before = alongRow ? image.pixel(i - 1, index) : image.pixel(index, i - 1); + const QRgb here = alongRow ? image.pixel(i, index) : image.pixel(index, i); + if (here != before) + runs++; + } + return runs; +} + +/// Returns the number of pixels of a row of an image that have a colour. +int pixelsOfColor(const QImage& image, int row, const QColor& color) +{ + int count = 0; + for (int x = 0; x < image.width(); x++) + if (closeColors(image.pixelColor(x, row), color)) + count++; + return count; +} + } // namespace void TestGenerators::patternsDeclareDescribedSettings() @@ -1462,6 +1490,7 @@ void TestGenerators::patternsMoveByDefault() for (const char* fileName : PATTERN_FILES) { GeneratorPtr pattern = shipped(fileName); + QVERIFY2(pattern, fileName); QCOMPARE(pattern->settings()->find("speed")->value().toDouble(), DEFAULT_PATTERN_SPEED); QCOMPARE(pattern->settings()->find("speed")->info().unit(), SettingInfo::PerMinute); QVERIFY2(pattern->isAnimated(), fileName); @@ -1598,3 +1627,67 @@ void TestGenerators::gradientHardnessGivesPlainBands() CHECK_PIXEL(threeBands, ODD_QUARTER, ODD_MIDDLE, TEAL); CHECK_PIXEL(threeBands, ODD_MIDDLE, ODD_MIDDLE, PLUM); } + +void TestGenerators::stripesCrossTheImage() +{ + OffscreenContext gl; + if (!gl.ok) + QSKIP("No desktop OpenGL context available"); + + // Four pairs at 0°, sharp: eight upright stripes, the first of Color A. + GeneratorPtr stripes = shipped("stripes.fs"); + stripes->setResolution(ODD_SIZE); + set(*stripes, "speed", 0.0); + set(*stripes, "softness", 0.0); + set(*stripes, "color_a", ORANGE); + set(*stripes, "color_b", TEAL); + QImage image = drawnImage(*stripes); + QCOMPARE(colorCount(image), 2); + QCOMPARE(runCount(image, ODD_MIDDLE, true), 8); + // A column inside a stripe: the middle column is on the edge between two. + const int insideStripe = ODD_MIDDLE - ODD_SIZE / 16; + QCOMPARE(runCount(image, insideStripe, false), 1); + CHECK_PIXEL(image, 0, ODD_MIDDLE, ORANGE); + + // The share of Color A follows the width, to a pixel per edge. + set(*stripes, "stripe_width", 0.25); + image = drawnImage(*stripes); + const int expected = ODD_SIZE / 4; + const int edges = 8; + QVERIFY2(qAbs(pixelsOfColor(image, ODD_MIDDLE, ORANGE) - expected) <= edges, + qPrintable(QString("%1 pixels of Color A").arg(pixelsOfColor(image, ODD_MIDDLE, ORANGE)))); + + // At 90°, the stripes lie down. + set(*stripes, "stripe_width", 0.5); + set(*stripes, "angle", 90.0); + image = drawnImage(*stripes); + QCOMPARE(runCount(image, ODD_MIDDLE, false), 8); + QCOMPARE(runCount(image, insideStripe, true), 1); + + // Soft edges blend the two colours. + set(*stripes, "softness", 4.0); + QVERIFY(colorCount(drawnImage(*stripes)) > 2); +} + +void TestGenerators::stripesSpeedChangesDoNotJump() +{ + // The stripes move by as many pairs as the time played times the speed; changing the + // speed goes on from where they are. + GeneratorPtr stripesOwner = shipped("stripes.fs"); + IsfGenerator* stripes = qobject_cast(stripesOwner.get()); + QVERIFY(stripes); + const double pairsPerSecond = 1.0; + set(*stripes, "speed", pairsPerSecond * SECONDS_PER_MINUTE); + stripes->play(); + QTest::qWait(PLAY_MS); + set(*stripes, "speed", 0.0); + const double stopTime = stripes->time(); + const double stopped = stripes->generatorValue("phase"); + QVERIFY2(turnDistance(stopped, stopTime * pairsPerSecond) < PHASE_TOLERANCE, + qPrintable(QString("%1 after %2 s").arg(stopped).arg(stopTime))); + QTest::qWait(PLAY_MS); + QCOMPARE(stripes->generatorValue("phase"), stopped); + + set(*stripes, "speed", pairsPerSecond * SECONDS_PER_MINUTE); + QVERIFY(turnDistance(stripes->generatorValue("phase"), stopped) < PHASE_TOLERANCE); +} diff --git a/tests/TestGenerators.h b/tests/TestGenerators.h index df55e874..75fabd53 100644 --- a/tests/TestGenerators.h +++ b/tests/TestGenerators.h @@ -61,6 +61,8 @@ private slots: void gradientDrawsItsShapes(); void gradientBlendsTwoOrThreeColors(); void gradientHardnessGivesPlainBands(); + void stripesCrossTheImage(); + void stripesSpeedChangesDoNotJump(); }; #endif /* TEST_GENERATORS_H_ */ diff --git a/tests/TestSourceTypes.cpp b/tests/TestSourceTypes.cpp index b1d4f1e2..8e2942a6 100644 --- a/tests/TestSourceTypes.cpp +++ b/tests/TestSourceTypes.cpp @@ -83,7 +83,7 @@ void TestSourceTypes::builtinTypesAreRegistered() generators << type->id; QCOMPARE(generators, QStringList({ "mapmap.shaders:checker.fs", "mapmap.shaders:grid.fs", ProjectTypes::COLOR_GENERATOR, "mapmap.shaders:color-wheel.fs", - "mapmap.shaders:gradient.fs" })); + "mapmap.shaders:gradient.fs", "mapmap.shaders:stripes.fs" })); // The colour keeps its shortcut. QCOMPARE(registry.find("ColorGenerator")->shortcut, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_A)); From 82ce43faeb5ef0fa2e8fd60bc337688c80254332 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 05/11] Add Waves, a generator of waves in lines or rings --- CHANGELOG.md | 1 + docs/extensions/isf.md | 2 +- resources/shaders.qrc | 1 + resources/shaders/waves.fs | 151 +++++++++++++++++++++++++++++++++++++ src/core/ShaderLibrary.cpp | 1 + src/core/ShaderStrings.cpp | 15 +++- src/core/SourceTypes.h | 1 + tests/TestGenerators.cpp | 35 ++++++++- tests/TestGenerators.h | 1 + tests/TestSourceTypes.cpp | 3 +- 10 files changed, 207 insertions(+), 4 deletions(-) create mode 100644 resources/shaders/waves.fs diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d30d0ac..ee1ca911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ New: - Color Wheel draws colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, over its whole image, from one set of settings, without modes: segments around the circle, rings along the radius, a twist that winds the segments into spirals, a smoothness, a palette chosen among presets, a hue shift, radial saturation and lightness, a rotation in revolutions per minute that never jumps when its speed changes, and a flow that moves the rings away from the centre or towards it, in radii per minute, at the same speed whatever their number. Presets set the geometry. - Gradient, a generator of two or three colours, linear, radial, conic or in a diamond, repeated and mirrored, from smooth to sharp bands, with a centre and an angle. It moves along its shape as soon as it is added, at a speed in repeats per minute that never jumps when it changes. A slight dithering hides the steps between colours on a large projection. Its linear and radial forms start from the ISF files of Carter Rosenberg (MIT License), credited in `resources/shaders/CREDITS.md`. - Stripes, a generator of stripes of two colours: how many pairs cross the image, their angle, the share of each colour and the softness of their edges in pixels. They go by as soon as they are added, at a speed in pairs per minute. It starts from Stripes of VIDVOX (MIT License). +- Waves, a generator of waves of two colours, in straight lines at an angle or in rings around a centre, from a soft sine to sharp bands. They go forward as soon as they are added, at a speed in waves per minute; rings go away from the centre, or towards it in reverse. - A color is now a generator: its layers have an input shape, like those of an image, and its image is 256 × 256 by default. Projects with the color sources of earlier versions open with color generators and look the same: the alpha of their color, which was not drawn, is dropped. The MCP tool `create_color_source` creates a color generator. - Checker, Grid and Color Wheel are shader files in the ISF format, shipped in the folder `shaders` of MapMap: editing one changes the generator at the next start. MapMap reads ISF generators of one pass, adds a few keys of its own and of MadMapper to say how their settings are shown, and the time bases and animators of MadMapper to keep their animations from jumping, and lists each shipped shader in File > Add Generator. Projects with the generators of earlier versions open as before. See `docs/extensions/isf.md`. - A source that this version cannot open, such as a Syphon source on GNU/Linux or Windows, is kept with its layers: it shows a "missing" image and is saved as it was read, so that it comes back on a computer that can open it. diff --git a/docs/extensions/isf.md b/docs/extensions/isf.md index 63a2c6ba..f24ff6e3 100644 --- a/docs/extensions/isf.md +++ b/docs/extensions/isf.md @@ -1,6 +1,6 @@ # ISF shaders in MapMap -MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid, Color Wheel, Gradient and Stripes are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. +MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid, Color Wheel, Gradient, Stripes and Waves are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. ## Where the shipped shaders are diff --git a/resources/shaders.qrc b/resources/shaders.qrc index 011aba7a..78cea6ee 100644 --- a/resources/shaders.qrc +++ b/resources/shaders.qrc @@ -7,6 +7,7 @@ shaders/color-wheel.fs shaders/gradient.fs shaders/stripes.fs + shaders/waves.fs shaders/color-adjustment.fs shaders/invert.fs shaders/colorize.fs diff --git a/resources/shaders/waves.fs b/resources/shaders/waves.fs new file mode 100644 index 00000000..0c7ae5c4 --- /dev/null +++ b/resources/shaders/waves.fs @@ -0,0 +1,151 @@ +/*{ + "ISFVSN": "2", + "DESCRIPTION": "Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward.", + "CREDIT": "MapMap contributors, GNU GPL version 3 or later", + "CATEGORIES": ["Generator"], + "INPUTS": [ + { + "NAME": "shape", + "TYPE": "long", + "LABEL": "Geometry/Shape", + "VALUES": [0, 1], + "LABELS": ["Lines", "Rings"], + "DEFAULT": 0, + "DESCRIPTION": "Lines are straight waves across the image; rings go out from the centre." + }, + { + "NAME": "angle", + "TYPE": "float", + "LABEL": "Geometry/Angle", + "MIN": -180.0, + "MAX": 180.0, + "DEFAULT": 0.0, + "STEP": 1.0, + "UNIT": "degrees", + "DESCRIPTION": "The direction in which straight waves go, clockwise from left to right. Rings do not use it." + }, + { + "NAME": "center", + "TYPE": "point2D", + "LABEL": "Geometry/Center", + "MIN": [0.0, 0.0], + "MAX": [1.0, 1.0], + "DEFAULT": [0.5, 0.5], + "DESCRIPTION": "The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it." + }, + { + "NAME": "count", + "TYPE": "float", + "LABEL": "Geometry/Count", + "MIN": 1.0, + "MAX": 64.0, + "SLIDER_MAX": 32.0, + "DEFAULT": 4.0, + "STEP": 0.5, + "DESCRIPTION": "How many waves cross the image, or go from the centre to the edge." + }, + { + "NAME": "sharpness", + "TYPE": "float", + "LABEL": "Geometry/Sharpness", + "MIN": 0.0, + "MAX": 1.0, + "DEFAULT": 0.0, + "STEP": 0.01, + "UNIT": "percent", + "DESCRIPTION": "0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges." + }, + { + "NAME": "color_a", + "TYPE": "color", + "LABEL": "Color/Color A", + "DEFAULT": [0.0, 0.0, 0.0, 1.0], + "DESCRIPTION": "The colour of the troughs." + }, + { + "NAME": "color_b", + "TYPE": "color", + "LABEL": "Color/Color B", + "DEFAULT": [1.0, 1.0, 1.0, 1.0], + "DESCRIPTION": "The colour of the crests." + }, + { + "NAME": "speed", + "TYPE": "float", + "LABEL": "Animation/Speed", + "MIN": 0.0, + "MAX": 120.0, + "DEFAULT": 6.0, + "STEP": 0.1, + "UNIT": "per_minute", + "DESCRIPTION": "How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still." + }, + { + "NAME": "reverse", + "TYPE": "bool", + "LABEL": "Animation/Reverse", + "DEFAULT": false, + "DESCRIPTION": "The waves go the other way: rings come towards the centre." + } + ], + "GENERATORS": [ + { "NAME": "phase", "TYPE": "animator", "PARAMS": { "shape": "In", "bpm": "speed", "reverse": "reverse" } } + ] +}*/ + +// Written in GLSL 1.20, which MapMap compiles on every platform, the Raspberry Pi included. +// The motion comes from an animator, a fraction of a cycle that wraps around by itself: it +// keeps its precision however long MapMap runs, unlike a time that grows. + +const float TWO_PI = 6.28318530718; + +// Distance from the centre at which rings have gone through Count waves: the middle of each +// edge of the image when the centre is in the middle. +const float EDGE_DISTANCE = 0.5; + +// A sharpness of 1 still blends over this much of a wave, to keep the bands from flickering +// at their edges. +const float SHARPEST_BLEND = 0.0001; + +// A value closer than this to 0 or 1 is a plain colour. +const float PLAIN = 0.0001; + +// One step of a colour of 8 bits. +const float COLOR_STEP = 1.0 / 255.0; + +// The constants of interleaved gradient noise (Jorge Jimenez, "Next Generation Post +// Processing in Call of Duty: Advanced Warfare", 2014). +const vec2 DITHER_WEIGHTS = vec2(0.06711056, 0.00583715); +const float DITHER_SCALE = 52.9829189; + +// Interleaved gradient noise: a fixed pattern of small values, from -0.5 to 0.5, that hides +// the steps of a gradient of 8-bit colours, the same at each frame. +float dither(vec2 pixel) { + return fract(DITHER_SCALE * fract(dot(pixel, DITHER_WEIGHTS))) - 0.5; +} + +void main() { + // Counted from the top left, as the center and the angle. + vec2 point = vec2(isf_FragNormCoord.x, 1.0 - isf_FragNormCoord.y); + + // Position along the waves, in waves, at the start of the cycle of the animator. + float along; + if (shape == 1) { + along = distance(point, center) / EDGE_DISTANCE; + } else { + float turn = radians(angle); + along = dot(point - vec2(0.5), vec2(cos(turn), sin(turn))) + 0.5; + } + float position = along * count - phase; + + // A sine, squeezed towards a square wave as the sharpness grows. + float wave = cos(TWO_PI * position); + float squeezed = clamp(wave / max(1.0 - sharpness, SHARPEST_BLEND), -1.0, 1.0); + float amount = 0.5 + 0.5 * squeezed; + + vec4 color = mix(color_a, color_b, amount); + // Only where colours blend: plain bands stay plain. + if (amount > PLAIN && amount < 1.0 - PLAIN) + color.rgb += dither(gl_FragCoord.xy) * COLOR_STEP; + gl_FragColor = color; +} diff --git a/src/core/ShaderLibrary.cpp b/src/core/ShaderLibrary.cpp index 3fb78ada..ec64514f 100644 --- a/src/core/ShaderLibrary.cpp +++ b/src/core/ShaderLibrary.cpp @@ -54,6 +54,7 @@ const MenuRank SHIPPED_RANKS[] = { { "color-wheel.fs", COLOR_WHEEL_MENU_ORDER }, { "gradient.fs", GRADIENT_MENU_ORDER }, { "stripes.fs", STRIPES_MENU_ORDER }, + { "waves.fs", WAVES_MENU_ORDER }, }; /// Returns the rank of a shader in the Add Generator menu. diff --git a/src/core/ShaderStrings.cpp b/src/core/ShaderStrings.cpp index 37d39bca..0c7c3f1f 100644 --- a/src/core/ShaderStrings.cpp +++ b/src/core/ShaderStrings.cpp @@ -199,7 +199,20 @@ QStringList ShaderLibrary::shippedTexts() QT_TRANSLATE_NOOP("Shaders", "Which side lets what is behind show through instead of its colour."), QT_TRANSLATE_NOOP("Shaders", "None"), QT_TRANSLATE_NOOP("Shaders", "Dark"), - QT_TRANSLATE_NOOP("Shaders", "Light") + QT_TRANSLATE_NOOP("Shaders", "Light"), + QT_TRANSLATE_NOOP("Shaders", "Waves"), + QT_TRANSLATE_NOOP("Shaders", "Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward."), + QT_TRANSLATE_NOOP("Shaders", "Lines are straight waves across the image; rings go out from the centre."), + QT_TRANSLATE_NOOP("Shaders", "Lines"), + QT_TRANSLATE_NOOP("Shaders", "The direction in which straight waves go, clockwise from left to right. Rings do not use it."), + QT_TRANSLATE_NOOP("Shaders", "The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it."), + QT_TRANSLATE_NOOP("Shaders", "How many waves cross the image, or go from the centre to the edge."), + QT_TRANSLATE_NOOP("Shaders", "Sharpness"), + QT_TRANSLATE_NOOP("Shaders", "0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges."), + QT_TRANSLATE_NOOP("Shaders", "The colour of the troughs."), + QT_TRANSLATE_NOOP("Shaders", "The colour of the crests."), + QT_TRANSLATE_NOOP("Shaders", "How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still."), + QT_TRANSLATE_NOOP("Shaders", "The waves go the other way: rings come towards the centre.") }; } diff --git a/src/core/SourceTypes.h b/src/core/SourceTypes.h index df2db7ea..b7932033 100644 --- a/src/core/SourceTypes.h +++ b/src/core/SourceTypes.h @@ -42,6 +42,7 @@ const int COLOR_MENU_ORDER = 30; const int COLOR_WHEEL_MENU_ORDER = 40; const int GRADIENT_MENU_ORDER = 50; const int STRIPES_MENU_ORDER = 60; +const int WAVES_MENU_ORDER = 70; const int OTHER_GENERATORS_MENU_ORDER = 100; /** diff --git a/tests/TestGenerators.cpp b/tests/TestGenerators.cpp index 7b87841b..2739aa79 100644 --- a/tests/TestGenerators.cpp +++ b/tests/TestGenerators.cpp @@ -89,7 +89,7 @@ const int ODD_QUARTER = ODD_SIZE / 4; const int GRADIENT_TOLERANCE = 8; /// The patterns shipped with MapMap, after the tools to fit shapes. -const char* const PATTERN_FILES[] = { "gradient.fs", "stripes.fs" }; +const char* const PATTERN_FILES[] = { "gradient.fs", "stripes.fs", "waves.fs" }; /// Default speed of the patterns: one repeat every 10 seconds. const double DEFAULT_PATTERN_SPEED = 6.0; @@ -1691,3 +1691,36 @@ void TestGenerators::stripesSpeedChangesDoNotJump() set(*stripes, "speed", pairsPerSecond * SECONDS_PER_MINUTE); QVERIFY(turnDistance(stripes->generatorValue("phase"), stopped) < PHASE_TOLERANCE); } + +void TestGenerators::wavesDrawLinesAndRings() +{ + OffscreenContext gl; + if (!gl.ok) + QSKIP("No desktop OpenGL context available"); + + // Four straight waves at 0°: a crest of Color B on the left edge, a trough of Color A an + // eighth of the image further, the same colour down each column. + GeneratorPtr waves = shipped("waves.fs"); + waves->setResolution(ODD_SIZE); + set(*waves, "speed", 0.0); + set(*waves, "color_a", ORANGE); + set(*waves, "color_b", TEAL); + QImage image = drawnImage(*waves); + QVERIFY(closeColors(image.pixelColor(0, ODD_MIDDLE), TEAL, GRADIENT_TOLERANCE)); + QVERIFY2(closeColors(image.pixelColor(ODD_SIZE / 8, ODD_MIDDLE), ORANGE, GRADIENT_TOLERANCE), + qPrintable(colorText(image.pixelColor(ODD_SIZE / 8, ODD_MIDDLE)))); + CHECK_PIXEL(image, ODD_QUARTER, 0, image.pixelColor(ODD_QUARTER, ODD_SIZE - 1)); + QVERIFY(colorCount(image) > 2); + + // Rings: a crest at the centre, the same colour at the same distance from it. + set(*waves, "shape", "rings"); + image = drawnImage(*waves); + QVERIFY(closeColors(image.pixelColor(ODD_MIDDLE, ODD_MIDDLE), TEAL, GRADIENT_TOLERANCE)); + const int distance = ODD_SIZE / 6; + CHECK_PIXEL(image, ODD_MIDDLE + distance, ODD_MIDDLE, image.pixelColor(ODD_MIDDLE, ODD_MIDDLE - distance)); + CHECK_PIXEL(image, ODD_MIDDLE - distance, ODD_MIDDLE, image.pixelColor(ODD_MIDDLE, ODD_MIDDLE + distance)); + + // Fully sharp: nothing but the two colours. + set(*waves, "sharpness", 1.0); + QCOMPARE(colorCount(drawnImage(*waves)), 2); +} diff --git a/tests/TestGenerators.h b/tests/TestGenerators.h index 75fabd53..195620be 100644 --- a/tests/TestGenerators.h +++ b/tests/TestGenerators.h @@ -63,6 +63,7 @@ private slots: void gradientHardnessGivesPlainBands(); void stripesCrossTheImage(); void stripesSpeedChangesDoNotJump(); + void wavesDrawLinesAndRings(); }; #endif /* TEST_GENERATORS_H_ */ diff --git a/tests/TestSourceTypes.cpp b/tests/TestSourceTypes.cpp index 8e2942a6..359c7596 100644 --- a/tests/TestSourceTypes.cpp +++ b/tests/TestSourceTypes.cpp @@ -83,7 +83,8 @@ void TestSourceTypes::builtinTypesAreRegistered() generators << type->id; QCOMPARE(generators, QStringList({ "mapmap.shaders:checker.fs", "mapmap.shaders:grid.fs", ProjectTypes::COLOR_GENERATOR, "mapmap.shaders:color-wheel.fs", - "mapmap.shaders:gradient.fs", "mapmap.shaders:stripes.fs" })); + "mapmap.shaders:gradient.fs", "mapmap.shaders:stripes.fs", + "mapmap.shaders:waves.fs" })); // The colour keeps its shortcut. QCOMPARE(registry.find("ColorGenerator")->shortcut, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_A)); From a05074b113e333fdbecdaa26066f21ae5eb6e6f7 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 06/11] Add Noise, a generator of smooth noise, cells or plasma --- CHANGELOG.md | 1 + docs/extensions/isf.md | 2 +- resources/shaders.qrc | 1 + resources/shaders/CREDITS.md | 28 +++++ resources/shaders/noise.fs | 234 +++++++++++++++++++++++++++++++++++ src/core/ShaderLibrary.cpp | 1 + src/core/ShaderStrings.cpp | 17 +++ src/core/SourceTypes.h | 1 + tests/TestGenerators.cpp | 33 ++++- tests/TestGenerators.h | 1 + tests/TestSourceTypes.cpp | 2 +- 11 files changed, 318 insertions(+), 3 deletions(-) create mode 100644 resources/shaders/noise.fs diff --git a/CHANGELOG.md b/CHANGELOG.md index ee1ca911..1ef11abe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ New: - Gradient, a generator of two or three colours, linear, radial, conic or in a diamond, repeated and mirrored, from smooth to sharp bands, with a centre and an angle. It moves along its shape as soon as it is added, at a speed in repeats per minute that never jumps when it changes. A slight dithering hides the steps between colours on a large projection. Its linear and radial forms start from the ISF files of Carter Rosenberg (MIT License), credited in `resources/shaders/CREDITS.md`. - Stripes, a generator of stripes of two colours: how many pairs cross the image, their angle, the share of each colour and the softness of their edges in pixels. They go by as soon as they are added, at a speed in pairs per minute. It starts from Stripes of VIDVOX (MIT License). - Waves, a generator of waves of two colours, in straight lines at an angle or in rings around a centre, from a soft sine to sharp bands. They go forward as soon as they are added, at a speed in waves per minute; rings go away from the centre, or towards it in reverse. +- Noise, a generator of noise between two colours: smooth clouds, cells around points that wander, or a plasma, with a scale, a number of layers of detail and a seed that changes the pattern. It moves as soon as it is added and comes back to where it started a given number of times per minute, without ever sliding or jumping. Smooth and Cells start from the ISF files of VIDVOX and the simplex noise of Ashima Arts and Stefan Gustavson (MIT License). - A color is now a generator: its layers have an input shape, like those of an image, and its image is 256 × 256 by default. Projects with the color sources of earlier versions open with color generators and look the same: the alpha of their color, which was not drawn, is dropped. The MCP tool `create_color_source` creates a color generator. - Checker, Grid and Color Wheel are shader files in the ISF format, shipped in the folder `shaders` of MapMap: editing one changes the generator at the next start. MapMap reads ISF generators of one pass, adds a few keys of its own and of MadMapper to say how their settings are shown, and the time bases and animators of MadMapper to keep their animations from jumping, and lists each shipped shader in File > Add Generator. Projects with the generators of earlier versions open as before. See `docs/extensions/isf.md`. - A source that this version cannot open, such as a Syphon source on GNU/Linux or Windows, is kept with its layers: it shows a "missing" image and is saved as it was read, so that it comes back on a computer that can open it. diff --git a/docs/extensions/isf.md b/docs/extensions/isf.md index f24ff6e3..de1144e6 100644 --- a/docs/extensions/isf.md +++ b/docs/extensions/isf.md @@ -1,6 +1,6 @@ # ISF shaders in MapMap -MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid, Color Wheel, Gradient, Stripes and Waves are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. +MapMap draws generators and effects from fragment shaders written in the [ISF format](https://isf.video) (Interactive Shader Format): a JSON header in the first comment of the file, which describes the inputs of the shader, then GLSL code. Checker, Grid, Color Wheel, Gradient, Stripes, Waves and Noise are such generators, shipped with MapMap, and so are the effects listed below. A shipped shader that takes code from other free software names it in its `CREDIT`, and `CREDITS.md`, in the folder `shaders`, gives the licences. ## Where the shipped shaders are diff --git a/resources/shaders.qrc b/resources/shaders.qrc index 78cea6ee..e5d6bb2f 100644 --- a/resources/shaders.qrc +++ b/resources/shaders.qrc @@ -8,6 +8,7 @@ shaders/gradient.fs shaders/stripes.fs shaders/waves.fs + shaders/noise.fs shaders/color-adjustment.fs shaders/invert.fs shaders/colorize.fs diff --git a/resources/shaders/CREDITS.md b/resources/shaders/CREDITS.md index 688d6001..d205f1fc 100644 --- a/resources/shaders/CREDITS.md +++ b/resources/shaders/CREDITS.md @@ -10,6 +10,7 @@ The shaders of this folder are part of MapMap, under the GNU General Public Lice | `posterize.fs` | Posterize by VIDVOX and Luminance Posterize by zoidberg (ISF-Files, MIT License), with the conversions between RGB and HSV of Sam Hocevar that the latter gives. | | `gradient.fs` | Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License). | | `stripes.fs` | Stripes by VIDVOX (ISF-Files, MIT License). | +| `noise.fs` | Smooth: Simplex Noise by VIDVOX (ISF-Files, MIT License), with the simplex noise of Ashima Arts and Stefan Gustavson (webgl-noise, MIT License). Cells: Worley Cells by VIDVOX (ISF-Files, MIT License). | ## Romain Dura, ISC License @@ -56,3 +57,30 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` + +## Ashima Arts and Stefan Gustavson, webgl-noise, MIT License + +From github.com/ashima/webgl-noise. + +``` +Copyright (C) 2011 by Ashima Arts (Simplex noise) +Copyright (C) 2011-2016 by Stefan Gustavson (Classic noise and others) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +``` diff --git a/resources/shaders/noise.fs b/resources/shaders/noise.fs new file mode 100644 index 00000000..8ace983f --- /dev/null +++ b/resources/shaders/noise.fs @@ -0,0 +1,234 @@ +/*{ + "ISFVSN": "2", + "DESCRIPTION": "Noise that moves slowly: smooth clouds, cells or a plasma, between two colours.", + "CREDIT": "Smooth after Simplex Noise by VIDVOX, with the simplex noise of Ashima Arts and Stefan Gustavson (MIT License); Cells after Worley Cells by VIDVOX (ISF-Files, MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", + "CATEGORIES": ["Generator"], + "INPUTS": [ + { + "NAME": "kind", + "TYPE": "long", + "LABEL": "Geometry/Kind", + "VALUES": [0, 1, 2], + "LABELS": ["Smooth", "Cells", "Plasma"], + "DEFAULT": 0, + "DESCRIPTION": "Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other." + }, + { + "NAME": "scale", + "TYPE": "float", + "LABEL": "Geometry/Scale", + "MIN": 0.5, + "MAX": 64.0, + "SLIDER_MAX": 16.0, + "DEFAULT": 4.0, + "STEP": 0.1, + "DESCRIPTION": "How many clouds, cells or waves cross the image." + }, + { + "NAME": "detail", + "TYPE": "long", + "LABEL": "Geometry/Detail", + "MIN": 1, + "MAX": 6, + "DEFAULT": 3, + "DESCRIPTION": "How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer." + }, + { + "NAME": "seed", + "TYPE": "long", + "LABEL": "Geometry/Seed", + "MIN": 0, + "MAX": 999, + "DEFAULT": 1, + "DESCRIPTION": "Changes the pattern: each number gives another one, always the same." + }, + { + "NAME": "color_a", + "TYPE": "color", + "LABEL": "Color/Color A", + "DEFAULT": [0.0, 0.0, 0.0, 1.0], + "DESCRIPTION": "The colour of the low values." + }, + { + "NAME": "color_b", + "TYPE": "color", + "LABEL": "Color/Color B", + "DEFAULT": [1.0, 1.0, 1.0, 1.0], + "DESCRIPTION": "The colour of the high values." + }, + { + "NAME": "speed", + "TYPE": "float", + "LABEL": "Animation/Speed", + "MIN": 0.0, + "MAX": 120.0, + "DEFAULT": 6.0, + "STEP": 0.1, + "UNIT": "per_minute", + "DESCRIPTION": "How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still." + }, + { + "NAME": "reverse", + "TYPE": "bool", + "LABEL": "Animation/Reverse", + "DEFAULT": false, + "DESCRIPTION": "The noise goes through its motion the other way." + } + ], + "GENERATORS": [ + { "NAME": "phase", "TYPE": "animator", "PARAMS": { "shape": "In", "bpm": "speed", "reverse": "reverse" } } + ] +}*/ + +// Written in GLSL 1.20, which MapMap compiles on every platform, the Raspberry Pi included. +// The motion comes from an animator, a fraction of a cycle that wraps around by itself: each +// part of the noise goes round a circle once per cycle, so the noise comes back to where it +// started, and keeps its precision however long MapMap runs. The image depends on the +// position, the settings and that fraction only: the same at the same moment. + +const float TWO_PI = 6.28318530718; + +// The golden ratio, to spread the directions of the layers. +const float GOLDEN = 1.61803398875; + +// Most layers drawn: the bound of Detail. +const int MAX_LAYERS = 6; + +// Each layer of smooth noise is finer than the last by this much, and counts this much less. +const float LACUNARITY = 2.0; +const float PERSISTENCE = 0.5; + +// How far each layer of smooth noise goes round its circle, in features of that layer. +const float SMOOTH_ORBIT = 0.6; + +// How far each point of the cells wanders from its place, in cells, and how much of a cell +// its place may be moved by. +const float CELL_ORBIT = 0.3; +const float CELL_JITTER = 0.7; + +// The distance from a point of a cell at which Cells reaches Color B, in cells. +const float CELL_REACH = 0.9; + +// Each wave of the plasma is finer than the last by this much. +const float PLASMA_FREQUENCY_STEP = 0.5; + +// How far the centre of the round waves of the plasma drifts, in units of the scale, and how +// much faster it drifts across than down. +const float PLASMA_DRIFT = 0.5; +const float PLASMA_DRIFT_RATIO = 2.0; + +// Seeds are spread over this many units of noise, to keep its coordinates small and precise. +const float SEED_SPREAD = 97.0; + +// ---- Smooth: 2D simplex noise, output roughly from -1 to 1. ---- +// The Ashima Arts and Stefan Gustavson implementation (github.com/ashima/webgl-noise, MIT +// License), as Simplex Noise by VIDVOX gives it. +vec3 permute(vec3 x) { + return mod(((x * 34.0) + 1.0) * x, 289.0); +} + +float simplex(vec2 v) { + const vec4 C = vec4(0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439); + vec2 i = floor(v + dot(v, C.yy)); + vec2 x0 = v - i + dot(i, C.xx); + vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); + vec4 x12 = x0.xyxy + C.xxzz; + x12.xy -= i1; + i = mod(i, 289.0); + vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0)) + i.x + vec3(0.0, i1.x, 1.0)); + vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy), dot(x12.zw, x12.zw)), 0.0); + m = m * m; + m = m * m; + vec3 x = 2.0 * fract(p * C.www) - 1.0; + vec3 h = abs(x) - 0.5; + vec3 ox = floor(x + 0.5); + vec3 a0 = x - ox; + m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h); + vec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + g.yz = a0.yz * x12.xz + h.yz * x12.yw; + return 130.0 * dot(m, g); +} + +// Layers of simplex noise, each finer than the last, each going round its own circle, so +// that the noise boils rather than slides; from 0 to 1. +float smoothNoise(vec2 position, vec2 seedOffset, float turn) { + float total = 0.0; + float amplitude = 1.0; + float frequency = 1.0; + float sum = 0.0; + for (int layer = 0; layer < MAX_LAYERS; layer++) { + if (layer >= detail) + break; + float start = float(layer) * GOLDEN * TWO_PI; + vec2 orbit = SMOOTH_ORBIT * vec2(cos(turn + start), sin(turn + start)); + total += simplex(position * frequency + seedOffset + orbit) * amplitude; + sum += amplitude; + amplitude *= PERSISTENCE; + frequency *= LACUNARITY; + } + return clamp(0.5 + 0.5 * total / sum, 0.0, 1.0); +} + +// ---- Cells: Worley noise, after Worley Cells by VIDVOX. ---- +// Two values from 0 to 1 for each cell. +vec2 cellHash(vec2 cell) { + vec2 p = vec2(dot(cell, vec2(127.1, 311.7)), dot(cell, vec2(269.5, 183.3))); + return fract(sin(p) * 43758.5453); +} + +// The distance to the nearest point, each point wandering round a circle in its cell; from 0 +// at a point to 1 far from all. +float cellNoise(vec2 position, vec2 seedOffset, float turn) { + vec2 shifted = position + seedOffset; + vec2 cell = floor(shifted); + float nearest = 2.0; + for (int dy = -1; dy <= 1; dy++) { + for (int dx = -1; dx <= 1; dx++) { + vec2 neighbour = cell + vec2(float(dx), float(dy)); + vec2 h = cellHash(neighbour); + vec2 place = vec2(0.5) + (h - 0.5) * CELL_JITTER; + vec2 wander = CELL_ORBIT * vec2(sin(turn + h.x * TWO_PI), cos(turn + h.y * TWO_PI)); + nearest = min(nearest, distance(shifted, neighbour + place + wander)); + } + } + return clamp(nearest / CELL_REACH, 0.0, 1.0); +} + +// ---- Plasma: waves that cross each other, each turning a whole number of times per cycle. ---- +float plasma(vec2 position, vec2 seedOffset, float turn) { + float total = 0.0; + for (int layer = 0; layer < MAX_LAYERS; layer++) { + if (layer >= detail) + break; + float index = float(layer); + float direction = index * GOLDEN * TWO_PI + seedOffset.x; + vec2 across = vec2(cos(direction), sin(direction)); + float frequency = 1.0 + PLASMA_FREQUENCY_STEP * index; + // Straight waves, then waves in circles around a point that drifts. + vec2 middle = PLASMA_DRIFT * vec2(sin(turn + direction), cos(turn + PLASMA_DRIFT_RATIO * direction)); + if (mod(index, 2.0) < 1.0) + total += sin(TWO_PI * dot(position + seedOffset, across) * frequency + turn * (index + 1.0)); + else + total += sin(TWO_PI * length(position - middle * frequency) * frequency + turn * (index + 1.0)); + } + return 0.5 + 0.5 * total / float(detail); +} + +void main() { + // Counted from the top left; the image is square, as every generator. + vec2 position = vec2(isf_FragNormCoord.x, 1.0 - isf_FragNormCoord.y) * scale; + float turn = TWO_PI * phase; + float spread = fract(float(seed) * GOLDEN) * SEED_SPREAD; + vec2 seedOffset = vec2(spread, fract(spread * GOLDEN) * SEED_SPREAD); + + float value; + if (kind == 1) + value = cellNoise(position, seedOffset, turn); + else if (kind == 2) + value = plasma(position, seedOffset, turn); + else + value = smoothNoise(position, seedOffset, turn); + + gl_FragColor = mix(color_a, color_b, value); +} diff --git a/src/core/ShaderLibrary.cpp b/src/core/ShaderLibrary.cpp index ec64514f..a3426943 100644 --- a/src/core/ShaderLibrary.cpp +++ b/src/core/ShaderLibrary.cpp @@ -55,6 +55,7 @@ const MenuRank SHIPPED_RANKS[] = { { "gradient.fs", GRADIENT_MENU_ORDER }, { "stripes.fs", STRIPES_MENU_ORDER }, { "waves.fs", WAVES_MENU_ORDER }, + { "noise.fs", NOISE_MENU_ORDER }, }; /// Returns the rank of a shader in the Add Generator menu. diff --git a/src/core/ShaderStrings.cpp b/src/core/ShaderStrings.cpp index 0c7c3f1f..3bf61560 100644 --- a/src/core/ShaderStrings.cpp +++ b/src/core/ShaderStrings.cpp @@ -168,6 +168,23 @@ QStringList ShaderLibrary::shippedTexts() QT_TRANSLATE_NOOP("Shaders", "Removes the light parts instead of the dark ones."), QT_TRANSLATE_NOOP("Shaders", "Channel"), QT_TRANSLATE_NOOP("Shaders", "What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three."), + QT_TRANSLATE_NOOP("Shaders", "Noise"), + QT_TRANSLATE_NOOP("Shaders", "Noise that moves slowly: smooth clouds, cells or a plasma, between two colours."), + QT_TRANSLATE_NOOP("Shaders", "Kind"), + QT_TRANSLATE_NOOP("Shaders", "Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other."), + QT_TRANSLATE_NOOP("Shaders", "Smooth"), + QT_TRANSLATE_NOOP("Shaders", "Cells"), + QT_TRANSLATE_NOOP("Shaders", "Plasma"), + QT_TRANSLATE_NOOP("Shaders", "Scale"), + QT_TRANSLATE_NOOP("Shaders", "How many clouds, cells or waves cross the image."), + QT_TRANSLATE_NOOP("Shaders", "Detail"), + QT_TRANSLATE_NOOP("Shaders", "How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer."), + QT_TRANSLATE_NOOP("Shaders", "Seed"), + QT_TRANSLATE_NOOP("Shaders", "Changes the pattern: each number gives another one, always the same."), + QT_TRANSLATE_NOOP("Shaders", "The colour of the low values."), + QT_TRANSLATE_NOOP("Shaders", "The colour of the high values."), + QT_TRANSLATE_NOOP("Shaders", "How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still."), + QT_TRANSLATE_NOOP("Shaders", "The noise goes through its motion the other way."), QT_TRANSLATE_NOOP("Shaders", "Posterize"), QT_TRANSLATE_NOOP("Shaders", "Reduces the image to a few levels of each colour, in flat bands, as a poster."), QT_TRANSLATE_NOOP("Shaders", "The number of levels of each colour, black and full included."), diff --git a/src/core/SourceTypes.h b/src/core/SourceTypes.h index b7932033..3063f534 100644 --- a/src/core/SourceTypes.h +++ b/src/core/SourceTypes.h @@ -43,6 +43,7 @@ const int COLOR_WHEEL_MENU_ORDER = 40; const int GRADIENT_MENU_ORDER = 50; const int STRIPES_MENU_ORDER = 60; const int WAVES_MENU_ORDER = 70; +const int NOISE_MENU_ORDER = 80; const int OTHER_GENERATORS_MENU_ORDER = 100; /** diff --git a/tests/TestGenerators.cpp b/tests/TestGenerators.cpp index 2739aa79..675b29cc 100644 --- a/tests/TestGenerators.cpp +++ b/tests/TestGenerators.cpp @@ -89,7 +89,7 @@ const int ODD_QUARTER = ODD_SIZE / 4; const int GRADIENT_TOLERANCE = 8; /// The patterns shipped with MapMap, after the tools to fit shapes. -const char* const PATTERN_FILES[] = { "gradient.fs", "stripes.fs", "waves.fs" }; +const char* const PATTERN_FILES[] = { "gradient.fs", "stripes.fs", "waves.fs", "noise.fs" }; /// Default speed of the patterns: one repeat every 10 seconds. const double DEFAULT_PATTERN_SPEED = 6.0; @@ -1724,3 +1724,34 @@ void TestGenerators::wavesDrawLinesAndRings() set(*waves, "sharpness", 1.0); QCOMPARE(colorCount(drawnImage(*waves)), 2); } + +void TestGenerators::noiseIsTheSameAtTheSameMoment() +{ + OffscreenContext gl; + if (!gl.ok) + QSKIP("No desktop OpenGL context available"); + + GeneratorPtr noise = shipped("noise.fs"); + noise->setResolution(ODD_SIZE); + set(*noise, "speed", 0.0); + // A noise has many shades, not a flat colour. + const int fewestShades = 16; + QList kinds; + for (const char* kind : { "smooth", "cells", "plasma" }) + { + set(*noise, "kind", kind); + const QImage image = drawnImage(*noise); + QVERIFY2(colorCount(image) > fewestShades, kind); + + // Another seed, another pattern; back to the first seed, the same image again. + set(*noise, "seed", 2); + QVERIFY2(drawnImage(*noise) != image, kind); + set(*noise, "seed", 1); + QCOMPARE(drawnImage(*noise), image); + kinds.append(image); + } + QVERIFY(kinds.at(0) != kinds.at(1) && kinds.at(1) != kinds.at(2) && kinds.at(0) != kinds.at(2)); + + // Black and white by default. + QCOMPARE(QColor(kinds.at(2).pixel(ODD_MIDDLE, ODD_MIDDLE)).saturation(), 0); +} diff --git a/tests/TestGenerators.h b/tests/TestGenerators.h index 195620be..15deb191 100644 --- a/tests/TestGenerators.h +++ b/tests/TestGenerators.h @@ -64,6 +64,7 @@ private slots: void stripesCrossTheImage(); void stripesSpeedChangesDoNotJump(); void wavesDrawLinesAndRings(); + void noiseIsTheSameAtTheSameMoment(); }; #endif /* TEST_GENERATORS_H_ */ diff --git a/tests/TestSourceTypes.cpp b/tests/TestSourceTypes.cpp index 359c7596..b31485c7 100644 --- a/tests/TestSourceTypes.cpp +++ b/tests/TestSourceTypes.cpp @@ -84,7 +84,7 @@ void TestSourceTypes::builtinTypesAreRegistered() QCOMPARE(generators, QStringList({ "mapmap.shaders:checker.fs", "mapmap.shaders:grid.fs", ProjectTypes::COLOR_GENERATOR, "mapmap.shaders:color-wheel.fs", "mapmap.shaders:gradient.fs", "mapmap.shaders:stripes.fs", - "mapmap.shaders:waves.fs" })); + "mapmap.shaders:waves.fs", "mapmap.shaders:noise.fs" })); // The colour keeps its shortcut. QCOMPARE(registry.find("ColorGenerator")->shortcut, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_A)); From 9e2146ce19fa5b8a0895343102f0708f4d201fac Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 07/11] Test that a project keeps the settings of the four new generators --- tests/TestProjectRoundTrip.cpp | 24 +++ tests/TestProjectRoundTrip.h | 1 + tests/fixtures/patterns.mmp | 303 +++++++++++++++++++++++++++++++++ 3 files changed, 328 insertions(+) create mode 100644 tests/fixtures/patterns.mmp diff --git a/tests/TestProjectRoundTrip.cpp b/tests/TestProjectRoundTrip.cpp index 1d1644ce..6821de0d 100644 --- a/tests/TestProjectRoundTrip.cpp +++ b/tests/TestProjectRoundTrip.cpp @@ -555,6 +555,30 @@ void TestProjectRoundTrip::opensBeta2GeneratorsAsShaders() } } +void TestProjectRoundTrip::keepsTheSettingsOfThePatterns() +{ + // Gradient, Stripes, Waves and Noise, each with settings other than their defaults, centres + // included: saved, they are written back as they were read. + const QByteArray original = readFixture(fixturesDir() + "/patterns.mmp"); + QVERIFY(!original.isEmpty()); + MappingManager manager; + QString error; + QVERIFY2(readProject(manager, original, &error), qPrintable(error)); + QCOMPARE(manager.nSources(), 4); + QCOMPARE(manager.nLayers(), 4); + + const QJsonArray originalSources = parse(original).value("sources").toArray(); + const QJsonArray writtenSources = parse(writeProject(manager)).value("sources").toArray(); + QCOMPARE(writtenSources.size(), originalSources.size()); + for (int i = 0; i < originalSources.size(); i++) + { + QVERIFY(qobject_cast(manager.getSource(i).data())); + QJsonObject written = writtenSources.at(i).toObject(); + QVERIFY(!written.take("shader_hash").toString().isEmpty()); + QCOMPARE(written, originalSources.at(i).toObject()); + } +} + void TestProjectRoundTrip::keepsSourcesOfUnknownTypes() { // A Syphon source opened where there is no Syphon: kept with its layer, which is not diff --git a/tests/TestProjectRoundTrip.h b/tests/TestProjectRoundTrip.h index fa6ae21e..b40ffe92 100644 --- a/tests/TestProjectRoundTrip.h +++ b/tests/TestProjectRoundTrip.h @@ -39,6 +39,7 @@ private slots: void resolvesProjectMediaPaths(); void skipsLayerWithoutSource(); void opensBeta2GeneratorsAsShaders(); + void keepsTheSettingsOfThePatterns(); void keepsSourcesOfUnknownTypes(); void formatVersionsCompareInOrder(); void tellsProjectsOfNewerFormats(); diff --git a/tests/fixtures/patterns.mmp b/tests/fixtures/patterns.mmp new file mode 100644 index 00000000..d1905a9c --- /dev/null +++ b/tests/fixtures/patterns.mmp @@ -0,0 +1,303 @@ +{ + "version": "1.0.0-beta.2", + "sources": [ + { + "type": "mapmap.shaders:gradient.fs", + "id": 1, + "name": "Gradient", + "locked": false, + "opacity": 1, + "x": 0, + "y": 0, + "resolution": 512, + "shape": "conic", + "angle": 30, + "center": [ + 0.25, + 0.75 + ], + "repeats": 3, + "mirror": false, + "hardness": 0.5, + "color_a": "#ff8800", + "color_b": "#0088aa", + "color_c": "#771155", + "three_colors": true, + "swap_colors": true, + "speed": 12.5, + "reverse": true + }, + { + "type": "mapmap.shaders:stripes.fs", + "id": 2, + "name": "Stripes", + "locked": false, + "opacity": 0.75, + "x": 0, + "y": 0, + "resolution": 1024, + "count": 9, + "angle": -45, + "stripe_width": 0.3, + "softness": 3.5, + "color_a": "#112233", + "color_b": "#ddeeff", + "speed": 0, + "reverse": true + }, + { + "type": "mapmap.shaders:waves.fs", + "id": 3, + "name": "Waves", + "locked": false, + "opacity": 1, + "x": 0, + "y": 0, + "resolution": 256, + "shape": "rings", + "angle": 90, + "center": [ + 0.6, + 0.4 + ], + "count": 7.5, + "sharpness": 0.8, + "color_a": "#000044", + "color_b": "#ffcc00", + "speed": 30, + "reverse": false + }, + { + "type": "mapmap.shaders:noise.fs", + "id": 4, + "name": "Noise", + "locked": false, + "opacity": 1, + "x": 0, + "y": 0, + "resolution": 2048, + "kind": "plasma", + "scale": 8.5, + "detail": 5, + "seed": 42, + "color_a": "#102030", + "color_b": "#f0e0d0", + "speed": 2.5, + "reverse": true + } + ], + "layers": [ + { + "type": "mapmap:texture-layer", + "id": 1, + "depth": 1, + "name": "Gradient on a quad", + "locked": false, + "opacity": 1, + "solo": false, + "visible": true, + "source_id": 1, + "destination": { + "type": "mapmap:mesh", + "locked": false, + "n_columns": 2, + "n_rows": 2, + "vertices": [ + [ + 0, + 0 + ], + [ + 400, + 20 + ], + [ + 10, + 300 + ], + [ + 380, + 320 + ] + ] + }, + "source": { + "type": "mapmap:mesh", + "locked": false, + "n_columns": 2, + "n_rows": 2, + "vertices": [ + [ + 0, + 0 + ], + [ + 512, + 0 + ], + [ + 0, + 512 + ], + [ + 512, + 512 + ] + ] + } + }, + { + "type": "mapmap:texture-layer", + "id": 2, + "depth": 2, + "name": "Stripes on a triangle", + "locked": false, + "opacity": 1, + "solo": false, + "visible": true, + "source_id": 2, + "destination": { + "type": "mapmap:triangle", + "locked": false, + "vertices": [ + [ + 500, + 0 + ], + [ + 900, + 50 + ], + [ + 700, + 400 + ] + ] + }, + "source": { + "type": "mapmap:triangle", + "locked": false, + "vertices": [ + [ + 0, + 0 + ], + [ + 1024, + 0 + ], + [ + 512, + 1024 + ] + ] + } + }, + { + "type": "mapmap:texture-layer", + "id": 3, + "depth": 3, + "name": "Waves on a quad", + "locked": false, + "opacity": 1, + "solo": false, + "visible": true, + "source_id": 3, + "destination": { + "type": "mapmap:mesh", + "locked": false, + "n_columns": 2, + "n_rows": 2, + "vertices": [ + [ + 0, + 500 + ], + [ + 400, + 520 + ], + [ + 10, + 800 + ], + [ + 380, + 820 + ] + ] + }, + "source": { + "type": "mapmap:mesh", + "locked": false, + "n_columns": 2, + "n_rows": 2, + "vertices": [ + [ + 0, + 0 + ], + [ + 256, + 0 + ], + [ + 0, + 256 + ], + [ + 256, + 256 + ] + ] + } + }, + { + "type": "mapmap:texture-layer", + "id": 4, + "depth": 4, + "name": "Noise on a triangle", + "locked": false, + "opacity": 1, + "solo": false, + "visible": true, + "source_id": 4, + "destination": { + "type": "mapmap:triangle", + "locked": false, + "vertices": [ + [ + 500, + 500 + ], + [ + 900, + 550 + ], + [ + 700, + 900 + ] + ] + }, + "source": { + "type": "mapmap:triangle", + "locked": false, + "vertices": [ + [ + 0, + 0 + ], + [ + 2048, + 0 + ], + [ + 1024, + 2048 + ] + ] + } + } + ] +} From 9cf7561167328f6d7febb8bd2543d8327ec2735b Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 08/11] Fold the radial colour and the animation of Color Wheel --- CHANGELOG.md | 2 +- resources/shaders/color-wheel.fs | 4 ++++ tests/TestGenerators.cpp | 13 +++++++++++++ tests/TestGenerators.h | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ef11abe..99d57f5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ New: - Add generators, sources drawn by the graphics card: Checker, Grid and Color, to fit shapes to surfaces, then Color Wheel, in File > Add Generator or with the generator button of the toolbar, which replaces the color button. Each has its own settings. Its image is square: its resolution is chosen among presets, from 256 × 256 to 4096 × 4096, or typed; a graphics card that cannot draw that large draws the largest it can. The image is drawn once per frame, whatever the number of views that show it. -- Color Wheel draws colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, over its whole image, from one set of settings, without modes: segments around the circle, rings along the radius, a twist that winds the segments into spirals, a smoothness, a palette chosen among presets, a hue shift, radial saturation and lightness, a rotation in revolutions per minute that never jumps when its speed changes, and a flow that moves the rings away from the centre or towards it, in radii per minute, at the same speed whatever their number. Presets set the geometry. +- Color Wheel draws colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, over its whole image, from one set of settings, without modes: segments around the circle, rings along the radius, a twist that winds the segments into spirals, a smoothness, a palette chosen among presets, a hue shift, radial saturation and lightness, a rotation in revolutions per minute that never jumps when its speed changes, and a flow that moves the rings away from the centre or towards it, in radii per minute, at the same speed whatever their number. Presets set the geometry. The radial colour and the animation are folded at first. - Gradient, a generator of two or three colours, linear, radial, conic or in a diamond, repeated and mirrored, from smooth to sharp bands, with a centre and an angle. It moves along its shape as soon as it is added, at a speed in repeats per minute that never jumps when it changes. A slight dithering hides the steps between colours on a large projection. Its linear and radial forms start from the ISF files of Carter Rosenberg (MIT License), credited in `resources/shaders/CREDITS.md`. - Stripes, a generator of stripes of two colours: how many pairs cross the image, their angle, the share of each colour and the softness of their edges in pixels. They go by as soon as they are added, at a speed in pairs per minute. It starts from Stripes of VIDVOX (MIT License). - Waves, a generator of waves of two colours, in straight lines at an angle or in rings around a centre, from a soft sine to sharp bands. They go forward as soon as they are added, at a speed in waves per minute; rings go away from the centre, or towards it in reverse. diff --git a/resources/shaders/color-wheel.fs b/resources/shaders/color-wheel.fs index 4342b789..82c8a389 100644 --- a/resources/shaders/color-wheel.fs +++ b/resources/shaders/color-wheel.fs @@ -151,6 +151,10 @@ "TYPE": "animator", "PARAMS": { "shape": "In", "bpm": "flow", "reverse": "flow_inward" } } + ], + "GROUPS": [ + { "LABEL": "Radial Color", "COLLAPSED": true }, + { "LABEL": "Animation", "COLLAPSED": true } ] }*/ diff --git a/tests/TestGenerators.cpp b/tests/TestGenerators.cpp index 675b29cc..64a05f9c 100644 --- a/tests/TestGenerators.cpp +++ b/tests/TestGenerators.cpp @@ -1755,3 +1755,16 @@ void TestGenerators::noiseIsTheSameAtTheSameMoment() // Black and white by default. QCOMPARE(QColor(kinds.at(2).pixel(ODD_MIDDLE, ODD_MIDDLE)).saturation(), 0); } + +void TestGenerators::colorWheelFoldsItsSeldomChangedGroups() +{ + // The geometry and the colours are what one changes; the radial colour and the animation + // are folded at first, out of the way. + GeneratorPtr wheel = shipped("color-wheel.fs"); + QStringList folded; + QStringList unfolded; + for (const SettingDisplayGroup& group : wheel->settings()->displayGroups()) + (group.collapsedByDefault ? folded : unfolded).append(group.id); + QCOMPARE(unfolded, QStringList({ "geometry", "color" })); + QCOMPARE(folded, QStringList({ "radial_color", "animation" })); +} diff --git a/tests/TestGenerators.h b/tests/TestGenerators.h index 15deb191..c4d4aadd 100644 --- a/tests/TestGenerators.h +++ b/tests/TestGenerators.h @@ -22,6 +22,7 @@ class TestGenerators: public QObject private slots: void initTestCase(); void generatorsDeclareTheirSettings(); + void colorWheelFoldsItsSeldomChangedGroups(); void frameCounterGrows(); void sizeStaysWithinBounds(); void resolutionPresets(); From 88d7875a713977bd9517d2dc2df774d857a681a4 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 09/11] Blend the colours of the four new generators through the hues --- CHANGELOG.md | 1 + resources/shaders/CREDITS.md | 33 +++++++++- resources/shaders/gradient.fs | 115 ++++++++++++++++++++++++++++++---- resources/shaders/noise.fs | 97 +++++++++++++++++++++++++++- resources/shaders/stripes.fs | 97 +++++++++++++++++++++++++++- resources/shaders/waves.fs | 97 +++++++++++++++++++++++++++- src/core/ShaderStrings.cpp | 4 ++ tests/TestGenerators.cpp | 76 ++++++++++++++++++++++ tests/TestGenerators.h | 1 + tests/fixtures/patterns.mmp | 4 ++ 10 files changed, 505 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99d57f5d..f3309b34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ New: - Stripes, a generator of stripes of two colours: how many pairs cross the image, their angle, the share of each colour and the softness of their edges in pixels. They go by as soon as they are added, at a speed in pairs per minute. It starts from Stripes of VIDVOX (MIT License). - Waves, a generator of waves of two colours, in straight lines at an angle or in rings around a centre, from a soft sine to sharp bands. They go forward as soon as they are added, at a speed in waves per minute; rings go away from the centre, or towards it in reverse. - Noise, a generator of noise between two colours: smooth clouds, cells around points that wander, or a plasma, with a scale, a number of layers of detail and a seed that changes the pattern. It moves as soon as it is added and comes back to where it started a given number of times per minute, without ever sliding or jumping. Smooth and Cells start from the ISF files of VIDVOX and the simplex noise of Ashima Arts and Stefan Gustavson (MIT License). +- Gradient, Stripes, Waves and Noise blend their colours as Blend says: in a straight line (RGB), through the hues the shorter way round the colour wheel (Hue), or the longer way round (Rainbow), which goes through all the hues when both colours have the same. The hues go through OKLab, the colour space of Björn Ottosson (MIT License), so that the lightness stays even. - A color is now a generator: its layers have an input shape, like those of an image, and its image is 256 × 256 by default. Projects with the color sources of earlier versions open with color generators and look the same: the alpha of their color, which was not drawn, is dropped. The MCP tool `create_color_source` creates a color generator. - Checker, Grid and Color Wheel are shader files in the ISF format, shipped in the folder `shaders` of MapMap: editing one changes the generator at the next start. MapMap reads ISF generators of one pass, adds a few keys of its own and of MadMapper to say how their settings are shown, and the time bases and animators of MadMapper to keep their animations from jumping, and lists each shipped shader in File > Add Generator. Projects with the generators of earlier versions open as before. See `docs/extensions/isf.md`. - A source that this version cannot open, such as a Syphon source on GNU/Linux or Windows, is kept with its layers: it shows a "missing" image and is saved as it was read, so that it comes back on a computer that can open it. diff --git a/resources/shaders/CREDITS.md b/resources/shaders/CREDITS.md index d205f1fc..5862d6ca 100644 --- a/resources/shaders/CREDITS.md +++ b/resources/shaders/CREDITS.md @@ -8,9 +8,10 @@ The shaders of this folder are part of MapMap, under the GNU General Public Lice | `invert.fs` | Channels: RGB Invert by VIDVOX (ISF-Files, MIT License). | | `colorize.fs` | False Color by zoidberg (ISF-Files, MIT License). | | `posterize.fs` | Posterize by VIDVOX and Luminance Posterize by zoidberg (ISF-Files, MIT License), with the conversions between RGB and HSV of Sam Hocevar that the latter gives. | -| `gradient.fs` | Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License). | -| `stripes.fs` | Stripes by VIDVOX (ISF-Files, MIT License). | -| `noise.fs` | Smooth: Simplex Noise by VIDVOX (ISF-Files, MIT License), with the simplex noise of Ashima Arts and Stefan Gustavson (webgl-noise, MIT License). Cells: Worley Cells by VIDVOX (ISF-Files, MIT License). | +| `gradient.fs` | Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License). Blend: the OKLab colour space of Björn Ottosson (MIT License). | +| `stripes.fs` | Stripes by VIDVOX (ISF-Files, MIT License). Blend: the OKLab colour space of Björn Ottosson (MIT License). | +| `waves.fs` | Blend: the OKLab colour space of Björn Ottosson (MIT License). | +| `noise.fs` | Smooth: Simplex Noise by VIDVOX (ISF-Files, MIT License), with the simplex noise of Ashima Arts and Stefan Gustavson (webgl-noise, MIT License). Cells: Worley Cells by VIDVOX (ISF-Files, MIT License). Blend: the OKLab colour space of Björn Ottosson (MIT License). | ## Romain Dura, ISC License @@ -84,3 +85,29 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` + +## Björn Ottosson, OKLab, MIT License + +From bottosson.github.io/posts/oklab: the matrices that turn linear sRGB into OKLab and back. + +``` +Copyright (c) 2021 Björn Ottosson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/resources/shaders/gradient.fs b/resources/shaders/gradient.fs index 68a6e4ea..320c1838 100644 --- a/resources/shaders/gradient.fs +++ b/resources/shaders/gradient.fs @@ -1,7 +1,7 @@ /*{ "ISFVSN": "2", "DESCRIPTION": "A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape.", - "CREDIT": "Linear and radial after Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", + "CREDIT": "Linear and radial after Linear Gradient and Radial Gradient by Carter Rosenberg (ISF-Files, MIT License); the OKLab colour space of Björn Ottosson (MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", "CATEGORIES": ["Generator"], "INPUTS": [ { @@ -97,6 +97,15 @@ "DEFAULT": false, "DESCRIPTION": "Swaps the first and the last colour." }, + { + "NAME": "blend", + "TYPE": "long", + "LABEL": "Color/Blend", + "VALUES": [0, 1, 2], + "LABELS": ["RGB", "Hue", "Rainbow"], + "DEFAULT": 0, + "DESCRIPTION": "How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour." + }, { "NAME": "speed", "TYPE": "float", @@ -182,9 +191,93 @@ float dither(vec2 pixel) { // Narrows a blend from 0 to 1 around its middle as the hardness grows: plain colours on // both sides, and a sharp edge at a hardness of 1. -float hardened(float blend) { +float hardened(float share) { float width = max(1.0 - hardness, SHARPEST_BLEND); - return clamp((blend - 0.5) / width + 0.5, 0.0, 1.0); + return clamp((share - 0.5) / width + 0.5, 0.0, 1.0); +} + +// ---- Blend: from one colour to the next in a straight line, or through the hues. ---- +// The colours go through OKLab, the perceptual colour space of Björn Ottosson (MIT License, +// see CREDITS.md), where a blend keeps an even lightness; its polar form gives the hue. + +// The transfer function of sRGB, the colours of the screen. +const float SRGB_KNEE = 0.04045; +const float SRGB_LINEAR_KNEE = 0.0031308; +const float SRGB_SLOPE = 12.92; +const float SRGB_OFFSET = 0.055; +const float SRGB_GAMMA = 2.4; + +// The matrices of OKLab, row by row: from linear sRGB to the cone responses LMS, from their +// cube roots to OKLab, and back. +const vec3 LMS_FROM_RGB_0 = vec3(0.4122214708, 0.5363325363, 0.0514459929); +const vec3 LMS_FROM_RGB_1 = vec3(0.2119034982, 0.6806995451, 0.1073969566); +const vec3 LMS_FROM_RGB_2 = vec3(0.0883024619, 0.2817188376, 0.6299787005); +const vec3 LAB_FROM_LMS_0 = vec3(0.2104542553, 0.7936177850, -0.0040720468); +const vec3 LAB_FROM_LMS_1 = vec3(1.9779984951, -2.4285922050, 0.4505937099); +const vec3 LAB_FROM_LMS_2 = vec3(0.0259040371, 0.7827717662, -0.8086757660); +const vec3 LMS_FROM_LAB_0 = vec3(1.0, 0.3963377774, 0.2158037573); +const vec3 LMS_FROM_LAB_1 = vec3(1.0, -0.1055613458, -0.0638541728); +const vec3 LMS_FROM_LAB_2 = vec3(1.0, -0.0894841775, -1.2914855480); +const vec3 RGB_FROM_LMS_0 = vec3(4.0767416621, -3.3077115913, 0.2309699292); +const vec3 RGB_FROM_LMS_1 = vec3(-1.2684380046, 2.6097574011, -0.3413193965); +const vec3 RGB_FROM_LMS_2 = vec3(-0.0041960863, -0.7034186147, 1.7076147010); + +// A chroma below this is a grey, whose hue means nothing. +const float GREY_CHROMA = 0.0001; + +// A turn of the colour wheel, and half of it, in radians. +const float HUE_TURN = 6.28318530718; +const float HALF_HUE_TURN = 3.14159265359; + +// The values of the input blend. +const int BLEND_RGB = 0; +const int BLEND_RAINBOW = 2; + +vec3 linearFromSrgb(vec3 c) { + return mix(c / SRGB_SLOPE, pow((c + SRGB_OFFSET) / (1.0 + SRGB_OFFSET), vec3(SRGB_GAMMA)), step(SRGB_KNEE, c)); +} + +vec3 srgbFromLinear(vec3 c) { + c = clamp(c, 0.0, 1.0); + return mix(c * SRGB_SLOPE, (1.0 + SRGB_OFFSET) * pow(c, vec3(1.0 / SRGB_GAMMA)) - SRGB_OFFSET, step(SRGB_LINEAR_KNEE, c)); +} + +vec3 oklabFromSrgb(vec3 c) { + vec3 l = linearFromSrgb(c); + vec3 lms = vec3(dot(LMS_FROM_RGB_0, l), dot(LMS_FROM_RGB_1, l), dot(LMS_FROM_RGB_2, l)); + lms = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0)); + return vec3(dot(LAB_FROM_LMS_0, lms), dot(LAB_FROM_LMS_1, lms), dot(LAB_FROM_LMS_2, lms)); +} + +vec3 srgbFromOklab(vec3 lab) { + vec3 lms = vec3(dot(LMS_FROM_LAB_0, lab), dot(LMS_FROM_LAB_1, lab), dot(LMS_FROM_LAB_2, lab)); + lms = lms * lms * lms; + return srgbFromLinear(vec3(dot(RGB_FROM_LMS_0, lms), dot(RGB_FROM_LMS_1, lms), dot(RGB_FROM_LMS_2, lms))); +} + +// The colour at a share from 0 (first) to 1 (second), as the input blend says: in a +// straight line, or through the hues the shorter or the longer way round. A grey takes the +// hue of the other colour; the longer way between two colours of the same hue is a full turn. +vec4 blendColors(vec4 first, vec4 second, float share) { + if (blend == BLEND_RGB) + return mix(first, second, share); + vec3 labFirst = oklabFromSrgb(first.rgb); + vec3 labSecond = oklabFromSrgb(second.rgb); + float chromaFirst = length(labFirst.yz); + float chromaSecond = length(labSecond.yz); + float hueFirst = chromaFirst > GREY_CHROMA ? atan(labFirst.z, labFirst.y) : 0.0; + float hueSecond = chromaSecond > GREY_CHROMA ? atan(labSecond.z, labSecond.y) : hueFirst; + if (chromaFirst <= GREY_CHROMA) + hueFirst = hueSecond; + // The shorter way, from minus half a turn to half a turn; the longer way goes round the other side. + float turn = mod(hueSecond - hueFirst + HALF_HUE_TURN, HUE_TURN) - HALF_HUE_TURN; + if (blend == BLEND_RAINBOW) + turn = turn > 0.0 ? turn - HUE_TURN : turn + HUE_TURN; + float hue = hueFirst + turn * share; + float chroma = mix(chromaFirst, chromaSecond, share); + float lightness = mix(labFirst.x, labSecond.x, share); + vec3 rgb = srgbFromOklab(vec3(lightness, chroma * cos(hue), chroma * sin(hue))); + return vec4(rgb, mix(first.a, second.a, share)); } void main() { @@ -204,20 +297,20 @@ void main() { vec4 first = swap_colors ? (three_colors ? color_c : color_b) : color_a; vec4 last = swap_colors ? color_a : (three_colors ? color_c : color_b); vec4 color; - float blend; + float share; if (three_colors && amount < 0.5) { - blend = hardened(2.0 * amount); - color = mix(first, color_b, blend); + share = hardened(2.0 * amount); + color = blendColors(first, color_b, share); } else if (three_colors) { - blend = hardened(2.0 * amount - 1.0); - color = mix(color_b, last, blend); + share = hardened(2.0 * amount - 1.0); + color = blendColors(color_b, last, share); } else { - blend = hardened(amount); - color = mix(first, last, blend); + share = hardened(amount); + color = blendColors(first, last, share); } // Only where colours blend: plain bands stay plain. - if (blend > PLAIN && blend < 1.0 - PLAIN) + if (share > PLAIN && share < 1.0 - PLAIN) color.rgb += dither(gl_FragCoord.xy) * COLOR_STEP; gl_FragColor = color; } diff --git a/resources/shaders/noise.fs b/resources/shaders/noise.fs index 8ace983f..02cfbc9a 100644 --- a/resources/shaders/noise.fs +++ b/resources/shaders/noise.fs @@ -1,7 +1,7 @@ /*{ "ISFVSN": "2", "DESCRIPTION": "Noise that moves slowly: smooth clouds, cells or a plasma, between two colours.", - "CREDIT": "Smooth after Simplex Noise by VIDVOX, with the simplex noise of Ashima Arts and Stefan Gustavson (MIT License); Cells after Worley Cells by VIDVOX (ISF-Files, MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", + "CREDIT": "Smooth after Simplex Noise by VIDVOX, with the simplex noise of Ashima Arts and Stefan Gustavson (MIT License); Cells after Worley Cells by VIDVOX (ISF-Files, MIT License); the OKLab colour space of Björn Ottosson (MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", "CATEGORIES": ["Generator"], "INPUTS": [ { @@ -56,6 +56,15 @@ "DEFAULT": [1.0, 1.0, 1.0, 1.0], "DESCRIPTION": "The colour of the high values." }, + { + "NAME": "blend", + "TYPE": "long", + "LABEL": "Color/Blend", + "VALUES": [0, 1, 2], + "LABELS": ["RGB", "Hue", "Rainbow"], + "DEFAULT": 0, + "DESCRIPTION": "How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour." + }, { "NAME": "speed", "TYPE": "float", @@ -215,6 +224,90 @@ float plasma(vec2 position, vec2 seedOffset, float turn) { return 0.5 + 0.5 * total / float(detail); } +// ---- Blend: from one colour to the next in a straight line, or through the hues. ---- +// The colours go through OKLab, the perceptual colour space of Björn Ottosson (MIT License, +// see CREDITS.md), where a blend keeps an even lightness; its polar form gives the hue. + +// The transfer function of sRGB, the colours of the screen. +const float SRGB_KNEE = 0.04045; +const float SRGB_LINEAR_KNEE = 0.0031308; +const float SRGB_SLOPE = 12.92; +const float SRGB_OFFSET = 0.055; +const float SRGB_GAMMA = 2.4; + +// The matrices of OKLab, row by row: from linear sRGB to the cone responses LMS, from their +// cube roots to OKLab, and back. +const vec3 LMS_FROM_RGB_0 = vec3(0.4122214708, 0.5363325363, 0.0514459929); +const vec3 LMS_FROM_RGB_1 = vec3(0.2119034982, 0.6806995451, 0.1073969566); +const vec3 LMS_FROM_RGB_2 = vec3(0.0883024619, 0.2817188376, 0.6299787005); +const vec3 LAB_FROM_LMS_0 = vec3(0.2104542553, 0.7936177850, -0.0040720468); +const vec3 LAB_FROM_LMS_1 = vec3(1.9779984951, -2.4285922050, 0.4505937099); +const vec3 LAB_FROM_LMS_2 = vec3(0.0259040371, 0.7827717662, -0.8086757660); +const vec3 LMS_FROM_LAB_0 = vec3(1.0, 0.3963377774, 0.2158037573); +const vec3 LMS_FROM_LAB_1 = vec3(1.0, -0.1055613458, -0.0638541728); +const vec3 LMS_FROM_LAB_2 = vec3(1.0, -0.0894841775, -1.2914855480); +const vec3 RGB_FROM_LMS_0 = vec3(4.0767416621, -3.3077115913, 0.2309699292); +const vec3 RGB_FROM_LMS_1 = vec3(-1.2684380046, 2.6097574011, -0.3413193965); +const vec3 RGB_FROM_LMS_2 = vec3(-0.0041960863, -0.7034186147, 1.7076147010); + +// A chroma below this is a grey, whose hue means nothing. +const float GREY_CHROMA = 0.0001; + +// A turn of the colour wheel, and half of it, in radians. +const float HUE_TURN = 6.28318530718; +const float HALF_HUE_TURN = 3.14159265359; + +// The values of the input blend. +const int BLEND_RGB = 0; +const int BLEND_RAINBOW = 2; + +vec3 linearFromSrgb(vec3 c) { + return mix(c / SRGB_SLOPE, pow((c + SRGB_OFFSET) / (1.0 + SRGB_OFFSET), vec3(SRGB_GAMMA)), step(SRGB_KNEE, c)); +} + +vec3 srgbFromLinear(vec3 c) { + c = clamp(c, 0.0, 1.0); + return mix(c * SRGB_SLOPE, (1.0 + SRGB_OFFSET) * pow(c, vec3(1.0 / SRGB_GAMMA)) - SRGB_OFFSET, step(SRGB_LINEAR_KNEE, c)); +} + +vec3 oklabFromSrgb(vec3 c) { + vec3 l = linearFromSrgb(c); + vec3 lms = vec3(dot(LMS_FROM_RGB_0, l), dot(LMS_FROM_RGB_1, l), dot(LMS_FROM_RGB_2, l)); + lms = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0)); + return vec3(dot(LAB_FROM_LMS_0, lms), dot(LAB_FROM_LMS_1, lms), dot(LAB_FROM_LMS_2, lms)); +} + +vec3 srgbFromOklab(vec3 lab) { + vec3 lms = vec3(dot(LMS_FROM_LAB_0, lab), dot(LMS_FROM_LAB_1, lab), dot(LMS_FROM_LAB_2, lab)); + lms = lms * lms * lms; + return srgbFromLinear(vec3(dot(RGB_FROM_LMS_0, lms), dot(RGB_FROM_LMS_1, lms), dot(RGB_FROM_LMS_2, lms))); +} + +// The colour at a share from 0 (first) to 1 (second), as the input blend says: in a +// straight line, or through the hues the shorter or the longer way round. A grey takes the +// hue of the other colour; the longer way between two colours of the same hue is a full turn. +vec4 blendColors(vec4 first, vec4 second, float share) { + if (blend == BLEND_RGB) + return mix(first, second, share); + vec3 labFirst = oklabFromSrgb(first.rgb); + vec3 labSecond = oklabFromSrgb(second.rgb); + float chromaFirst = length(labFirst.yz); + float chromaSecond = length(labSecond.yz); + float hueFirst = chromaFirst > GREY_CHROMA ? atan(labFirst.z, labFirst.y) : 0.0; + float hueSecond = chromaSecond > GREY_CHROMA ? atan(labSecond.z, labSecond.y) : hueFirst; + if (chromaFirst <= GREY_CHROMA) + hueFirst = hueSecond; + // The shorter way, from minus half a turn to half a turn; the longer way goes round the other side. + float turn = mod(hueSecond - hueFirst + HALF_HUE_TURN, HUE_TURN) - HALF_HUE_TURN; + if (blend == BLEND_RAINBOW) + turn = turn > 0.0 ? turn - HUE_TURN : turn + HUE_TURN; + float hue = hueFirst + turn * share; + float chroma = mix(chromaFirst, chromaSecond, share); + float lightness = mix(labFirst.x, labSecond.x, share); + vec3 rgb = srgbFromOklab(vec3(lightness, chroma * cos(hue), chroma * sin(hue))); + return vec4(rgb, mix(first.a, second.a, share)); +} + void main() { // Counted from the top left; the image is square, as every generator. vec2 position = vec2(isf_FragNormCoord.x, 1.0 - isf_FragNormCoord.y) * scale; @@ -230,5 +323,5 @@ void main() { else value = smoothNoise(position, seedOffset, turn); - gl_FragColor = mix(color_a, color_b, value); + gl_FragColor = blendColors(color_a, color_b, value); } diff --git a/resources/shaders/stripes.fs b/resources/shaders/stripes.fs index 952d186b..9074a519 100644 --- a/resources/shaders/stripes.fs +++ b/resources/shaders/stripes.fs @@ -1,7 +1,7 @@ /*{ "ISFVSN": "2", "DESCRIPTION": "Stripes of two colours, at any angle and width, going by.", - "CREDIT": "After Stripes by VIDVOX (ISF-Files, MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", + "CREDIT": "After Stripes by VIDVOX (ISF-Files, MIT License); the OKLab colour space of Björn Ottosson (MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", "CATEGORIES": ["Generator"], "INPUTS": [ { @@ -63,6 +63,15 @@ "DEFAULT": [1.0, 1.0, 1.0, 1.0], "DESCRIPTION": "The colour of the stripes between." }, + { + "NAME": "blend", + "TYPE": "long", + "LABEL": "Color/Blend", + "VALUES": [0, 1, 2], + "LABELS": ["RGB", "Hue", "Rainbow"], + "DEFAULT": 0, + "DESCRIPTION": "How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour." + }, { "NAME": "speed", "TYPE": "float", @@ -91,6 +100,90 @@ // The motion comes from an animator, a fraction of a cycle that wraps around by itself: it // keeps its precision however long MapMap runs, unlike a time that grows. +// ---- Blend: from one colour to the next in a straight line, or through the hues. ---- +// The colours go through OKLab, the perceptual colour space of Björn Ottosson (MIT License, +// see CREDITS.md), where a blend keeps an even lightness; its polar form gives the hue. + +// The transfer function of sRGB, the colours of the screen. +const float SRGB_KNEE = 0.04045; +const float SRGB_LINEAR_KNEE = 0.0031308; +const float SRGB_SLOPE = 12.92; +const float SRGB_OFFSET = 0.055; +const float SRGB_GAMMA = 2.4; + +// The matrices of OKLab, row by row: from linear sRGB to the cone responses LMS, from their +// cube roots to OKLab, and back. +const vec3 LMS_FROM_RGB_0 = vec3(0.4122214708, 0.5363325363, 0.0514459929); +const vec3 LMS_FROM_RGB_1 = vec3(0.2119034982, 0.6806995451, 0.1073969566); +const vec3 LMS_FROM_RGB_2 = vec3(0.0883024619, 0.2817188376, 0.6299787005); +const vec3 LAB_FROM_LMS_0 = vec3(0.2104542553, 0.7936177850, -0.0040720468); +const vec3 LAB_FROM_LMS_1 = vec3(1.9779984951, -2.4285922050, 0.4505937099); +const vec3 LAB_FROM_LMS_2 = vec3(0.0259040371, 0.7827717662, -0.8086757660); +const vec3 LMS_FROM_LAB_0 = vec3(1.0, 0.3963377774, 0.2158037573); +const vec3 LMS_FROM_LAB_1 = vec3(1.0, -0.1055613458, -0.0638541728); +const vec3 LMS_FROM_LAB_2 = vec3(1.0, -0.0894841775, -1.2914855480); +const vec3 RGB_FROM_LMS_0 = vec3(4.0767416621, -3.3077115913, 0.2309699292); +const vec3 RGB_FROM_LMS_1 = vec3(-1.2684380046, 2.6097574011, -0.3413193965); +const vec3 RGB_FROM_LMS_2 = vec3(-0.0041960863, -0.7034186147, 1.7076147010); + +// A chroma below this is a grey, whose hue means nothing. +const float GREY_CHROMA = 0.0001; + +// A turn of the colour wheel, and half of it, in radians. +const float HUE_TURN = 6.28318530718; +const float HALF_HUE_TURN = 3.14159265359; + +// The values of the input blend. +const int BLEND_RGB = 0; +const int BLEND_RAINBOW = 2; + +vec3 linearFromSrgb(vec3 c) { + return mix(c / SRGB_SLOPE, pow((c + SRGB_OFFSET) / (1.0 + SRGB_OFFSET), vec3(SRGB_GAMMA)), step(SRGB_KNEE, c)); +} + +vec3 srgbFromLinear(vec3 c) { + c = clamp(c, 0.0, 1.0); + return mix(c * SRGB_SLOPE, (1.0 + SRGB_OFFSET) * pow(c, vec3(1.0 / SRGB_GAMMA)) - SRGB_OFFSET, step(SRGB_LINEAR_KNEE, c)); +} + +vec3 oklabFromSrgb(vec3 c) { + vec3 l = linearFromSrgb(c); + vec3 lms = vec3(dot(LMS_FROM_RGB_0, l), dot(LMS_FROM_RGB_1, l), dot(LMS_FROM_RGB_2, l)); + lms = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0)); + return vec3(dot(LAB_FROM_LMS_0, lms), dot(LAB_FROM_LMS_1, lms), dot(LAB_FROM_LMS_2, lms)); +} + +vec3 srgbFromOklab(vec3 lab) { + vec3 lms = vec3(dot(LMS_FROM_LAB_0, lab), dot(LMS_FROM_LAB_1, lab), dot(LMS_FROM_LAB_2, lab)); + lms = lms * lms * lms; + return srgbFromLinear(vec3(dot(RGB_FROM_LMS_0, lms), dot(RGB_FROM_LMS_1, lms), dot(RGB_FROM_LMS_2, lms))); +} + +// The colour at a share from 0 (first) to 1 (second), as the input blend says: in a +// straight line, or through the hues the shorter or the longer way round. A grey takes the +// hue of the other colour; the longer way between two colours of the same hue is a full turn. +vec4 blendColors(vec4 first, vec4 second, float share) { + if (blend == BLEND_RGB) + return mix(first, second, share); + vec3 labFirst = oklabFromSrgb(first.rgb); + vec3 labSecond = oklabFromSrgb(second.rgb); + float chromaFirst = length(labFirst.yz); + float chromaSecond = length(labSecond.yz); + float hueFirst = chromaFirst > GREY_CHROMA ? atan(labFirst.z, labFirst.y) : 0.0; + float hueSecond = chromaSecond > GREY_CHROMA ? atan(labSecond.z, labSecond.y) : hueFirst; + if (chromaFirst <= GREY_CHROMA) + hueFirst = hueSecond; + // The shorter way, from minus half a turn to half a turn; the longer way goes round the other side. + float turn = mod(hueSecond - hueFirst + HALF_HUE_TURN, HUE_TURN) - HALF_HUE_TURN; + if (blend == BLEND_RAINBOW) + turn = turn > 0.0 ? turn - HUE_TURN : turn + HUE_TURN; + float hue = hueFirst + turn * share; + float chroma = mix(chromaFirst, chromaSecond, share); + float lightness = mix(labFirst.x, labSecond.x, share); + vec3 rgb = srgbFromOklab(vec3(lightness, chroma * cos(hue), chroma * sin(hue))); + return vec4(rgb, mix(first.a, second.a, share)); +} + void main() { // Counted from the top left, as the angle. vec2 point = vec2(isf_FragNormCoord.x, 1.0 - isf_FragNormCoord.y); @@ -112,5 +205,5 @@ void main() { amountA = 0.0; else if (stripe_width >= 1.0) amountA = 1.0; - gl_FragColor = mix(color_b, color_a, amountA); + gl_FragColor = blendColors(color_a, color_b, 1.0 - amountA); } diff --git a/resources/shaders/waves.fs b/resources/shaders/waves.fs index 0c7ae5c4..f9063847 100644 --- a/resources/shaders/waves.fs +++ b/resources/shaders/waves.fs @@ -1,7 +1,7 @@ /*{ "ISFVSN": "2", "DESCRIPTION": "Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward.", - "CREDIT": "MapMap contributors, GNU GPL version 3 or later", + "CREDIT": "The OKLab colour space of Björn Ottosson (MIT License); MapMap contributors, GNU GPL version 3 or later. See CREDITS.md.", "CATEGORIES": ["Generator"], "INPUTS": [ { @@ -69,6 +69,15 @@ "DEFAULT": [1.0, 1.0, 1.0, 1.0], "DESCRIPTION": "The colour of the crests." }, + { + "NAME": "blend", + "TYPE": "long", + "LABEL": "Color/Blend", + "VALUES": [0, 1, 2], + "LABELS": ["RGB", "Hue", "Rainbow"], + "DEFAULT": 0, + "DESCRIPTION": "How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour." + }, { "NAME": "speed", "TYPE": "float", @@ -124,6 +133,90 @@ float dither(vec2 pixel) { return fract(DITHER_SCALE * fract(dot(pixel, DITHER_WEIGHTS))) - 0.5; } +// ---- Blend: from one colour to the next in a straight line, or through the hues. ---- +// The colours go through OKLab, the perceptual colour space of Björn Ottosson (MIT License, +// see CREDITS.md), where a blend keeps an even lightness; its polar form gives the hue. + +// The transfer function of sRGB, the colours of the screen. +const float SRGB_KNEE = 0.04045; +const float SRGB_LINEAR_KNEE = 0.0031308; +const float SRGB_SLOPE = 12.92; +const float SRGB_OFFSET = 0.055; +const float SRGB_GAMMA = 2.4; + +// The matrices of OKLab, row by row: from linear sRGB to the cone responses LMS, from their +// cube roots to OKLab, and back. +const vec3 LMS_FROM_RGB_0 = vec3(0.4122214708, 0.5363325363, 0.0514459929); +const vec3 LMS_FROM_RGB_1 = vec3(0.2119034982, 0.6806995451, 0.1073969566); +const vec3 LMS_FROM_RGB_2 = vec3(0.0883024619, 0.2817188376, 0.6299787005); +const vec3 LAB_FROM_LMS_0 = vec3(0.2104542553, 0.7936177850, -0.0040720468); +const vec3 LAB_FROM_LMS_1 = vec3(1.9779984951, -2.4285922050, 0.4505937099); +const vec3 LAB_FROM_LMS_2 = vec3(0.0259040371, 0.7827717662, -0.8086757660); +const vec3 LMS_FROM_LAB_0 = vec3(1.0, 0.3963377774, 0.2158037573); +const vec3 LMS_FROM_LAB_1 = vec3(1.0, -0.1055613458, -0.0638541728); +const vec3 LMS_FROM_LAB_2 = vec3(1.0, -0.0894841775, -1.2914855480); +const vec3 RGB_FROM_LMS_0 = vec3(4.0767416621, -3.3077115913, 0.2309699292); +const vec3 RGB_FROM_LMS_1 = vec3(-1.2684380046, 2.6097574011, -0.3413193965); +const vec3 RGB_FROM_LMS_2 = vec3(-0.0041960863, -0.7034186147, 1.7076147010); + +// A chroma below this is a grey, whose hue means nothing. +const float GREY_CHROMA = 0.0001; + +// A turn of the colour wheel, and half of it, in radians. +const float HUE_TURN = 6.28318530718; +const float HALF_HUE_TURN = 3.14159265359; + +// The values of the input blend. +const int BLEND_RGB = 0; +const int BLEND_RAINBOW = 2; + +vec3 linearFromSrgb(vec3 c) { + return mix(c / SRGB_SLOPE, pow((c + SRGB_OFFSET) / (1.0 + SRGB_OFFSET), vec3(SRGB_GAMMA)), step(SRGB_KNEE, c)); +} + +vec3 srgbFromLinear(vec3 c) { + c = clamp(c, 0.0, 1.0); + return mix(c * SRGB_SLOPE, (1.0 + SRGB_OFFSET) * pow(c, vec3(1.0 / SRGB_GAMMA)) - SRGB_OFFSET, step(SRGB_LINEAR_KNEE, c)); +} + +vec3 oklabFromSrgb(vec3 c) { + vec3 l = linearFromSrgb(c); + vec3 lms = vec3(dot(LMS_FROM_RGB_0, l), dot(LMS_FROM_RGB_1, l), dot(LMS_FROM_RGB_2, l)); + lms = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0)); + return vec3(dot(LAB_FROM_LMS_0, lms), dot(LAB_FROM_LMS_1, lms), dot(LAB_FROM_LMS_2, lms)); +} + +vec3 srgbFromOklab(vec3 lab) { + vec3 lms = vec3(dot(LMS_FROM_LAB_0, lab), dot(LMS_FROM_LAB_1, lab), dot(LMS_FROM_LAB_2, lab)); + lms = lms * lms * lms; + return srgbFromLinear(vec3(dot(RGB_FROM_LMS_0, lms), dot(RGB_FROM_LMS_1, lms), dot(RGB_FROM_LMS_2, lms))); +} + +// The colour at a share from 0 (first) to 1 (second), as the input blend says: in a +// straight line, or through the hues the shorter or the longer way round. A grey takes the +// hue of the other colour; the longer way between two colours of the same hue is a full turn. +vec4 blendColors(vec4 first, vec4 second, float share) { + if (blend == BLEND_RGB) + return mix(first, second, share); + vec3 labFirst = oklabFromSrgb(first.rgb); + vec3 labSecond = oklabFromSrgb(second.rgb); + float chromaFirst = length(labFirst.yz); + float chromaSecond = length(labSecond.yz); + float hueFirst = chromaFirst > GREY_CHROMA ? atan(labFirst.z, labFirst.y) : 0.0; + float hueSecond = chromaSecond > GREY_CHROMA ? atan(labSecond.z, labSecond.y) : hueFirst; + if (chromaFirst <= GREY_CHROMA) + hueFirst = hueSecond; + // The shorter way, from minus half a turn to half a turn; the longer way goes round the other side. + float turn = mod(hueSecond - hueFirst + HALF_HUE_TURN, HUE_TURN) - HALF_HUE_TURN; + if (blend == BLEND_RAINBOW) + turn = turn > 0.0 ? turn - HUE_TURN : turn + HUE_TURN; + float hue = hueFirst + turn * share; + float chroma = mix(chromaFirst, chromaSecond, share); + float lightness = mix(labFirst.x, labSecond.x, share); + vec3 rgb = srgbFromOklab(vec3(lightness, chroma * cos(hue), chroma * sin(hue))); + return vec4(rgb, mix(first.a, second.a, share)); +} + void main() { // Counted from the top left, as the center and the angle. vec2 point = vec2(isf_FragNormCoord.x, 1.0 - isf_FragNormCoord.y); @@ -143,7 +236,7 @@ void main() { float squeezed = clamp(wave / max(1.0 - sharpness, SHARPEST_BLEND), -1.0, 1.0); float amount = 0.5 + 0.5 * squeezed; - vec4 color = mix(color_a, color_b, amount); + vec4 color = blendColors(color_a, color_b, amount); // Only where colours blend: plain bands stay plain. if (amount > PLAIN && amount < 1.0 - PLAIN) color.rgb += dither(gl_FragCoord.xy) * COLOR_STEP; diff --git a/src/core/ShaderStrings.cpp b/src/core/ShaderStrings.cpp index 3bf61560..c1848fa7 100644 --- a/src/core/ShaderStrings.cpp +++ b/src/core/ShaderStrings.cpp @@ -136,6 +136,10 @@ QStringList ShaderLibrary::shippedTexts() QT_TRANSLATE_NOOP("Shaders", "Goes from Color A to Color B, then to Color C."), QT_TRANSLATE_NOOP("Shaders", "Swap Colors"), QT_TRANSLATE_NOOP("Shaders", "Swaps the first and the last colour."), + QT_TRANSLATE_NOOP("Shaders", "Blend"), + QT_TRANSLATE_NOOP("Shaders", "How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour."), + QT_TRANSLATE_NOOP("Shaders", "RGB"), + QT_TRANSLATE_NOOP("Shaders", "Rainbow"), QT_TRANSLATE_NOOP("Shaders", "How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still."), QT_TRANSLATE_NOOP("Shaders", "The gradient moves the other way: towards the centre, or anticlockwise."), QT_TRANSLATE_NOOP("Shaders", "Grid"), diff --git a/tests/TestGenerators.cpp b/tests/TestGenerators.cpp index 64a05f9c..1b16c9b1 100644 --- a/tests/TestGenerators.cpp +++ b/tests/TestGenerators.cpp @@ -1768,3 +1768,79 @@ void TestGenerators::colorWheelFoldsItsSeldomChangedGroups() QCOMPARE(unfolded, QStringList({ "geometry", "color" })); QCOMPARE(folded, QStringList({ "radial_color", "animation" })); } + +namespace { + +/// Pure red and pure green, whose blends are told apart by the path they take. +const QColor PURE_RED(255, 0, 0); +const QColor PURE_GREEN(0, 255, 0); + +/// Bounds of an orange, between red and green on the shorter way round the hues, which a +/// straight blend never makes: it darkens the red as it adds green. +const int ORANGE_MIN_RED = 200; +const int ORANGE_MIN_GREEN = 100; +const int ORANGE_MAX_BLUE = 60; + +/// Bounds of a blue, on the longer way round: much more blue than red or green. +const int BLUE_MIN_BLUE = 200; +const int BLUE_LEAD = 50; + +/// Softness of the stripes in the blend test, in pixels: wide, so that every blend shows. +const double WIDE_SOFTNESS = 16.0; + +/// Whether a pixel of the image is orange, and whether one is blue. +struct HuesFound +{ + bool orange = false; + bool blue = false; +}; + +HuesFound huesIn(const QImage& image) +{ + HuesFound found; + for (int y = 0; y < image.height(); y++) + for (int x = 0; x < image.width(); x++) + { + const QColor c = image.pixelColor(x, y); + if (c.red() > ORANGE_MIN_RED && c.green() > ORANGE_MIN_GREEN && c.blue() < ORANGE_MAX_BLUE) + found.orange = true; + if (c.blue() > BLUE_MIN_BLUE && c.blue() > c.red() + BLUE_LEAD && c.blue() > c.green() + BLUE_LEAD) + found.blue = true; + } + return found; +} + +} // namespace + +void TestGenerators::patternsBlendThroughTheHues() +{ + OffscreenContext gl; + if (!gl.ok) + QSKIP("No desktop OpenGL context available"); + + for (const char* fileName : PATTERN_FILES) + { + GeneratorPtr pattern = shipped(fileName); + pattern->setResolution(ODD_SIZE); + set(*pattern, "speed", 0.0); + set(*pattern, "color_a", PURE_RED); + set(*pattern, "color_b", PURE_GREEN); + if (pattern->settings()->find("softness")) + set(*pattern, "softness", WIDE_SOFTNESS); + QVERIFY2(pattern->settings()->find("blend"), fileName); + + // In a straight line by default: from red to green through dark yellows. + HuesFound found = huesIn(drawnImage(*pattern)); + QVERIFY2(!found.orange && !found.blue, fileName); + + // The shorter way round the hues: through orange and yellow. + set(*pattern, "blend", "hue"); + found = huesIn(drawnImage(*pattern)); + QVERIFY2(found.orange && !found.blue, fileName); + + // The longer way round: through magenta, blue and cyan. + set(*pattern, "blend", "rainbow"); + found = huesIn(drawnImage(*pattern)); + QVERIFY2(found.blue, fileName); + } +} diff --git a/tests/TestGenerators.h b/tests/TestGenerators.h index c4d4aadd..2f21ca29 100644 --- a/tests/TestGenerators.h +++ b/tests/TestGenerators.h @@ -66,6 +66,7 @@ private slots: void stripesSpeedChangesDoNotJump(); void wavesDrawLinesAndRings(); void noiseIsTheSameAtTheSameMoment(); + void patternsBlendThroughTheHues(); }; #endif /* TEST_GENERATORS_H_ */ diff --git a/tests/fixtures/patterns.mmp b/tests/fixtures/patterns.mmp index d1905a9c..21ea9151 100644 --- a/tests/fixtures/patterns.mmp +++ b/tests/fixtures/patterns.mmp @@ -24,6 +24,7 @@ "color_c": "#771155", "three_colors": true, "swap_colors": true, + "blend": "hue", "speed": 12.5, "reverse": true }, @@ -42,6 +43,7 @@ "softness": 3.5, "color_a": "#112233", "color_b": "#ddeeff", + "blend": "rainbow", "speed": 0, "reverse": true }, @@ -64,6 +66,7 @@ "sharpness": 0.8, "color_a": "#000044", "color_b": "#ffcc00", + "blend": "hue", "speed": 30, "reverse": false }, @@ -82,6 +85,7 @@ "seed": 42, "color_a": "#102030", "color_b": "#f0e0d0", + "blend": "rainbow", "speed": 2.5, "reverse": true } From 89bdefedbb87f47d754f8f7e0bd301784f1f5020 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 10/11] Collect the texts of the shaders into every language --- translations/mapmap_ar.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_de.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_en.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_es.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_fr.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_hi.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_pt.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_ru.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_zh_CN.ts | 853 ++++++++++++++++++++++++++++++++--- translations/mapmap_zh_TW.ts | 853 ++++++++++++++++++++++++++++++++--- 10 files changed, 7890 insertions(+), 640 deletions(-) diff --git a/translations/mapmap_ar.ts b/translations/mapmap_ar.ts index a98b2874..ab864707 100644 --- a/translations/mapmap_ar.ts +++ b/translations/mapmap_ar.ts @@ -731,310 +731,1035 @@ ضبط الألوان - - Changes the brightness, the contrast, the saturation and the hue of the image. - يغيّر سطوع الصورة وتباينها وتشبعها ودرجة لونها. - - - + Brightness السطوع - + Added to each colour: below 0 darker, above 0 lighter. يُضاف إلى كل لون: تحت 0 أغمق، وفوق 0 أفتح. - + Contrast التباين - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. مدى بُعد الألوان عن الرمادي المتوسط: 0% كله رمادي، و100% دون تغيير. - + Saturation التشبع - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. مدى حيوية الألوان: 0% درجات من الرمادي، و100% دون تغيير. - + Hue درجة اللون - + Turns the colours around the colour wheel, by this angle. يدير الألوان حول عجلة الألوان بهذه الزاوية. - + Color Wheel عجلة الألوان - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. عجلات ألوان ولوالب وحلقات متحدة المركز ورقع شطرنج قطبية، مستقيمة أو ملتوية، من مجموعة إعدادات واحدة. - + Geometry الهندسة - + Segments المقاطع - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. عدد الأجزاء حول الدائرة؛ 1 يبقيها كاملة. مع لوحة ألوان من لونين، يعطي العدد الفردي العدد الزوجي الذي تحته، كي تتناوب الألوان على طول الدائرة. - + Rings الحلقات - + Number of rings from the centre to the edge of the disk; 0 for none. عدد الحلقات من المركز إلى حافة القرص؛ 0 لعدم وجود حلقات. - + Twist الالتواء - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. يلفّ المقاطع على شكل لوالب: عدد الدورات التي تقطعها من المركز إلى حافة القرص. القيم السالبة تلفّها في الاتجاه الآخر. - + Smoothness النعومة - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. الاستيفاء بين الألوان المتجاورة: حاد عند 0، ومتصل عند 100%. - + Color اللون + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette لوحة الألوان - + The colours of the pattern, in the order of their cycle. ألوان النقش، بترتيب دورتها. - + Spectrum الطيف - + Monochromatic أحادي اللون - + Grayscale تدرّج رمادي - + Black and White أبيض وأسود - + Complementary متكاملة - + Analogous متجاورة - + Triadic ثلاثية - + Hue Shift إزاحة درجة اللون - + Turns the hue of every colour; greys stay as they are. يدير درجة كل لون؛ يبقى الرمادي كما هو. - + Radial Color لون شعاعي - + Radial Saturation تشبع شعاعي - + Positive: grey centre; negative: grey circumference. The lightness is kept. موجب: مركز رمادي؛ سالب: محيط رمادي. تبقى الإضاءة كما هي. - + Radial Lightness إضاءة شعاعية - + Positive: white centre; negative: black centre. موجب: مركز أبيض؛ سالب: مركز أسود. - + Radial Falloff تلاشٍ شعاعي - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. منحنى التدرجين الشعاعيين: واسع تحت 1، وخطي عند 1، ومركّز فوق 1. - + Reverse Radial Gradient عكس التدرج الشعاعي - + Swaps the centre and the circumference in both radial gradients. يبادل بين المركز والمحيط في التدرجين الشعاعيين. - + Animation الحركة - + Speed السرعة - + How fast the pattern turns; 0 keeps it still. سرعة دوران النقش؛ 0 يبقيه ثابتًا. - + Reverse عكس - + Turns the pattern the other way. يدير النقش في الاتجاه الآخر. - + Flow التدفق - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. سرعة ابتعاد الحلقات عن المركز، بأنصاف الأقطار في الدقيقة، مهما كان عددها: عند 6، تنتقل الحلقة من المركز إلى الحافة في 10 ثوانٍ؛ 0 يبقيها ثابتة. - + Flow Inward تدفق نحو الداخل - + Moves the rings towards the centre. يحرّك الحلقات نحو المركز. - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid شبكة خطوط - + Lines of a colour on a background, along the borders and between columns and rows. خطوط بلون على خلفية، على طول الحواف وبين الأعمدة والصفوف. - + Columns الأعمدة - + The number of columns between the lines. عدد الأعمدة بين الخطوط. - + Rows الصفوف - + The number of rows between the lines. عدد الصفوف بين الخطوط. - + Thickness السماكة - + The thickness of the lines. سماكة الخطوط. - + The colour between the lines. اللون بين الخطوط. - + Line Color لون الخطوط - + The colour of the lines. لون الخطوط. + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_de.ts b/translations/mapmap_de.ts index 707b5671..6c6a2315 100644 --- a/translations/mapmap_de.ts +++ b/translations/mapmap_de.ts @@ -731,310 +731,1035 @@ Farbkorrektur - - Changes the brightness, the contrast, the saturation and the hue of the image. - Ändert Helligkeit, Kontrast, Sättigung und Farbton des Bildes. - - - + Brightness Helligkeit - + Added to each colour: below 0 darker, above 0 lighter. Wird zu jeder Farbe addiert: unter 0 dunkler, über 0 heller. - + Contrast Kontrast - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. Wie weit die Farben von mittlerem Grau entfernt sind: 0 % ist ganz grau, 100 % unverändert. - + Saturation Sättigung - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. Wie kräftig die Farben sind: 0 % ergibt Grautöne, 100 % unverändert. - + Hue Farbton - + Turns the colours around the colour wheel, by this angle. Dreht die Farben um diesen Winkel auf dem Farbkreis. - + Color Wheel Farbkreis - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. Farbkreise, Spiralen, konzentrische Ringe und polare Schachbretter, gerade oder verdreht, aus einem einzigen Satz von Einstellungen. - + Geometry Geometrie - + Segments Segmente - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. Anzahl der Teile rund um den Kreis; 1 lässt ihn ganz. Bei einer Palette aus zwei Farben ergibt eine ungerade Zahl die gerade Zahl darunter, damit sich die Farben ringsum abwechseln. - + Rings Ringe - + Number of rings from the centre to the edge of the disk; 0 for none. Anzahl der Ringe von der Mitte bis zum Rand der Scheibe; 0 für keine. - + Twist Verdrehung - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. Windet die Segmente zu Spiralen: die Umdrehungen, die sie von der Mitte bis zum Rand der Scheibe machen. Negative Werte winden in die andere Richtung. - + Smoothness Weichheit - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. Übergang zwischen benachbarten Farben: scharf bei 0, fließend bei 100%. - + Color Farbe + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette Palette - + The colours of the pattern, in the order of their cycle. Die Farben des Musters, in der Reihenfolge ihres Zyklus. - + Spectrum Spektrum - + Monochromatic Monochrom - + Grayscale Graustufen - + Black and White Schwarz-Weiß - + Complementary Komplementär - + Analogous Analog - + Triadic Triadisch - + Hue Shift Farbtonverschiebung - + Turns the hue of every colour; greys stay as they are. Dreht den Farbton jeder Farbe; Grautöne bleiben, wie sie sind. - + Radial Color Radiale Farbe - + Radial Saturation Radiale Sättigung - + Positive: grey centre; negative: grey circumference. The lightness is kept. Positiv: graue Mitte; negativ: grauer Rand. Die Helligkeit bleibt erhalten. - + Radial Lightness Radiale Helligkeit - + Positive: white centre; negative: black centre. Positiv: weiße Mitte; negativ: schwarze Mitte. - + Radial Falloff Radialer Abfall - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. Die Kurve beider radialer Verläufe: breit unter 1, linear bei 1, konzentriert über 1. - + Reverse Radial Gradient Radialen Verlauf umkehren - + Swaps the centre and the circumference in both radial gradients. Vertauscht Mitte und Rand in beiden radialen Verläufen. - + Animation Animation - + Speed Geschwindigkeit - + How fast the pattern turns; 0 keeps it still. Wie schnell sich das Muster dreht; 0 lässt es stillstehen. - + Reverse Umkehren - + Turns the pattern the other way. Dreht das Muster in die andere Richtung. - + Flow Fluss - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. Wie schnell sich die Ringe von der Mitte entfernen, in Radien pro Minute, unabhängig von ihrer Anzahl: bei 6 läuft ein Ring in 10 Sekunden von der Mitte zum Rand; 0 lässt sie stillstehen. - + Flow Inward Nach innen fließen - + Moves the rings towards the centre. Bewegt die Ringe zur Mitte hin. - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid Raster - + Lines of a colour on a background, along the borders and between columns and rows. Linien einer Farbe auf einem Hintergrund, entlang der Ränder und zwischen Spalten und Zeilen. - + Columns Spalten - + The number of columns between the lines. Die Anzahl der Spalten zwischen den Linien. - + Rows Zeilen - + The number of rows between the lines. Die Anzahl der Zeilen zwischen den Linien. - + Thickness Stärke - + The thickness of the lines. Die Stärke der Linien. - + The colour between the lines. Die Farbe zwischen den Linien. - + Line Color Linienfarbe - + The colour of the lines. Die Farbe der Linien. + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_en.ts b/translations/mapmap_en.ts index 64320755..bcdcd690 100644 --- a/translations/mapmap_en.ts +++ b/translations/mapmap_en.ts @@ -731,310 +731,1035 @@ Color Adjustment - - Changes the brightness, the contrast, the saturation and the hue of the image. - Changes the brightness, the contrast, the saturation and the hue of the image. - - - + Brightness Brightness - + Added to each colour: below 0 darker, above 0 lighter. Added to each colour: below 0 darker, above 0 lighter. - + Contrast Contrast - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. - + Saturation Saturation - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. How vivid the colours are: 0 % is shades of grey, 100 % unchanged. - + Hue Hue - + Turns the colours around the colour wheel, by this angle. Turns the colours around the colour wheel, by this angle. - + Color Wheel Color Wheel - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. - + Geometry Geometry - + Segments Segments - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. - + Rings Rings - + Number of rings from the centre to the edge of the disk; 0 for none. Number of rings from the centre to the edge of the disk; 0 for none. - + Twist Twist - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. - + Smoothness Smoothness - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. Interpolation between neighbouring colours: sharp at 0, continuous at 100%. - + Color Color + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette Palette - + The colours of the pattern, in the order of their cycle. The colours of the pattern, in the order of their cycle. - + Spectrum Spectrum - + Monochromatic Monochromatic - + Grayscale Grayscale - + Black and White Black and White - + Complementary Complementary - + Analogous Analogous - + Triadic Triadic - + Hue Shift Hue Shift - + Turns the hue of every colour; greys stay as they are. Turns the hue of every colour; greys stay as they are. - + Radial Color Radial Color - + Radial Saturation Radial Saturation - + Positive: grey centre; negative: grey circumference. The lightness is kept. Positive: grey centre; negative: grey circumference. The lightness is kept. - + Radial Lightness Radial Lightness - + Positive: white centre; negative: black centre. Positive: white centre; negative: black centre. - + Radial Falloff Radial Falloff - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. - + Reverse Radial Gradient Reverse Radial Gradient - + Swaps the centre and the circumference in both radial gradients. Swaps the centre and the circumference in both radial gradients. - + Animation Animation - + Speed Speed - + How fast the pattern turns; 0 keeps it still. How fast the pattern turns; 0 keeps it still. - + Reverse Reverse - + Turns the pattern the other way. Turns the pattern the other way. - + Flow Flow - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. - + Flow Inward Flow Inward - + Moves the rings towards the centre. Moves the rings towards the centre. - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid Grid - + Lines of a colour on a background, along the borders and between columns and rows. Lines of a colour on a background, along the borders and between columns and rows. - + Columns Columns - + The number of columns between the lines. The number of columns between the lines. - + Rows Rows - + The number of rows between the lines. The number of rows between the lines. - + Thickness Thickness - + The thickness of the lines. The thickness of the lines. - + The colour between the lines. The colour between the lines. - + Line Color Line Color - + The colour of the lines. The colour of the lines. + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_es.ts b/translations/mapmap_es.ts index 418a4632..359a6392 100644 --- a/translations/mapmap_es.ts +++ b/translations/mapmap_es.ts @@ -731,310 +731,1035 @@ Ajuste de color - - Changes the brightness, the contrast, the saturation and the hue of the image. - Cambia el brillo, el contraste, la saturación y el tono de la imagen. - - - + Brightness Brillo - + Added to each colour: below 0 darker, above 0 lighter. Se suma a cada color: por debajo de 0 más oscuro, por encima de 0 más claro. - + Contrast Contraste - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. Cuánto se alejan los colores del gris medio: 0 % es todo gris, 100 % sin cambios. - + Saturation Saturación - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. Cuán vivos son los colores: 0 % son tonos de gris, 100 % sin cambios. - + Hue Tono - + Turns the colours around the colour wheel, by this angle. Gira los colores alrededor de la rueda de color, en este ángulo. - + Color Wheel Rueda de color - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. Ruedas de color, espirales, anillos concéntricos y dameros polares, rectos o torcidos, a partir de un mismo conjunto de ajustes. - + Geometry Geometría - + Segments Segmentos - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. Número de partes alrededor del círculo; 1 lo deja entero. Con una paleta de dos colores, un número impar da el número par inferior, para que los colores se alternen en toda la vuelta. - + Rings Anillos - + Number of rings from the centre to the edge of the disk; 0 for none. Número de anillos del centro al borde del disco; 0 para ninguno. - + Twist Torsión - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. Enrolla los segmentos en espirales: las vueltas que dan del centro al borde del disco. Los valores negativos enrollan en el otro sentido. - + Smoothness Suavidad - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. Interpolación entre colores vecinos: nítida en 0, continua en 100%. - + Color Color + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette Paleta - + The colours of the pattern, in the order of their cycle. Los colores del motivo, en el orden de su ciclo. - + Spectrum Espectro - + Monochromatic Monocromática - + Grayscale Escala de grises - + Black and White Blanco y negro - + Complementary Complementaria - + Analogous Análoga - + Triadic Triádica - + Hue Shift Rotación de tono - + Turns the hue of every colour; greys stay as they are. Gira el tono de cada color; los grises se quedan como están. - + Radial Color Color radial - + Radial Saturation Saturación radial - + Positive: grey centre; negative: grey circumference. The lightness is kept. Positivo: centro gris; negativo: circunferencia gris. Se conserva la luminosidad. - + Radial Lightness Luminosidad radial - + Positive: white centre; negative: black centre. Positivo: centro blanco; negativo: centro negro. - + Radial Falloff Atenuación radial - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. La curva de ambos degradados radiales: amplia por debajo de 1, lineal en 1, concentrada por encima de 1. - + Reverse Radial Gradient Degradado radial invertido - + Swaps the centre and the circumference in both radial gradients. Intercambia el centro y la circunferencia en ambos degradados radiales. - + Animation Animación - + Speed Velocidad - + How fast the pattern turns; 0 keeps it still. Qué tan rápido gira el motivo; 0 lo deja quieto. - + Reverse Sentido inverso - + Turns the pattern the other way. Gira el motivo en el otro sentido. - + Flow Flujo - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. Qué tan rápido se alejan los anillos del centro, en radios por minuto, sea cual sea su número: a 6, un anillo va del centro al borde en 10 segundos; 0 los deja quietos. - + Flow Inward Flujo hacia dentro - + Moves the rings towards the centre. Mueve los anillos hacia el centro. - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid Cuadrícula - + Lines of a colour on a background, along the borders and between columns and rows. Líneas de un color sobre un fondo, a lo largo de los bordes y entre columnas y filas. - + Columns Columnas - + The number of columns between the lines. El número de columnas entre las líneas. - + Rows Filas - + The number of rows between the lines. El número de filas entre las líneas. - + Thickness Grosor - + The thickness of the lines. El grosor de las líneas. - + The colour between the lines. El color entre las líneas. - + Line Color Color de línea - + The colour of the lines. El color de las líneas. + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_fr.ts b/translations/mapmap_fr.ts index d2853a08..95596d14 100644 --- a/translations/mapmap_fr.ts +++ b/translations/mapmap_fr.ts @@ -731,310 +731,1035 @@ Réglage des couleurs - - Changes the brightness, the contrast, the saturation and the hue of the image. - Change la luminosité, le contraste, la saturation et la teinte de l'image. - - - + Brightness Luminosité - + Added to each colour: below 0 darker, above 0 lighter. Ajoutée à chaque couleur : sous 0 plus sombre, au-dessus de 0 plus clair. - + Contrast Contraste - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. L'écart des couleurs avec le gris moyen : 0 % donne tout gris, 100 % laisse inchangé. - + Saturation Saturation - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. La vivacité des couleurs : 0 % donne des nuances de gris, 100 % laisse inchangé. - + Hue Teinte - + Turns the colours around the colour wheel, by this angle. Fait tourner les couleurs sur la roue chromatique, de cet angle. - + Color Wheel Roue chromatique - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. Roues chromatiques, spirales, anneaux concentriques et damiers polaires, droits ou torsadés, à partir d'un seul jeu de réglages. - + Geometry Géométrie - + Segments Segments - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. Nombre de parts autour du cercle; 1 le garde entier. Avec une palette de deux couleurs, un nombre impair donne le nombre pair inférieur, pour que les couleurs alternent tout autour. - + Rings Anneaux - + Number of rings from the centre to the edge of the disk; 0 for none. Nombre d'anneaux du centre au bord du disque; 0 pour aucun. - + Twist Torsion - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. Enroule les segments en spirales : les tours qu'ils font du centre au bord du disque. Les valeurs négatives enroulent dans l'autre sens. - + Smoothness Lissage - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. Interpolation entre couleurs voisines : nette à 0, continue à 100 %. - + Color Couleur + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette Palette - + The colours of the pattern, in the order of their cycle. Les couleurs du motif, dans l'ordre de leur cycle. - + Spectrum Spectre - + Monochromatic Monochrome - + Grayscale Niveaux de gris - + Black and White Noir et blanc - + Complementary Complémentaire - + Analogous Analogue - + Triadic Triadique - + Hue Shift Décalage de teinte - + Turns the hue of every colour; greys stay as they are. Fait tourner la teinte de chaque couleur; les gris restent tels quels. - + Radial Color Couleur radiale - + Radial Saturation Saturation radiale - + Positive: grey centre; negative: grey circumference. The lightness is kept. Positif : centre gris; négatif : circonférence grise. La clarté est conservée. - + Radial Lightness Clarté radiale - + Positive: white centre; negative: black centre. Positif : centre blanc; négatif : centre noir. - + Radial Falloff Atténuation radiale - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. La courbe des deux dégradés radiaux : large sous 1, linéaire à 1, concentrée au-dessus de 1. - + Reverse Radial Gradient Inverser le dégradé radial - + Swaps the centre and the circumference in both radial gradients. Échange le centre et la circonférence dans les deux dégradés radiaux. - + Animation Animation - + Speed Vitesse - + How fast the pattern turns; 0 keeps it still. La vitesse de rotation du motif; 0 le garde immobile. - + Reverse Inverser - + Turns the pattern the other way. Fait tourner le motif dans l'autre sens. - + Flow Défilement - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. La vitesse à laquelle les anneaux s'éloignent du centre, en rayons par minute, quel que soit leur nombre : à 6, un anneau va du centre au bord en 10 secondes; 0 les garde immobiles. - + Flow Inward Défilement vers le centre - + Moves the rings towards the centre. Déplace les anneaux vers le centre. - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid Grille - + Lines of a colour on a background, along the borders and between columns and rows. Des lignes d'une couleur sur un fond, le long des bords et entre les colonnes et les rangées. - + Columns Colonnes - + The number of columns between the lines. Le nombre de colonnes entre les lignes. - + Rows Rangées - + The number of rows between the lines. Le nombre de rangées entre les lignes. - + Thickness Épaisseur - + The thickness of the lines. L'épaisseur des lignes. - + The colour between the lines. La couleur entre les lignes. - + Line Color Couleur des lignes - + The colour of the lines. La couleur des lignes. + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_hi.ts b/translations/mapmap_hi.ts index 9f4df55e..5051c6a2 100644 --- a/translations/mapmap_hi.ts +++ b/translations/mapmap_hi.ts @@ -731,310 +731,1035 @@ रंग समायोजन - - Changes the brightness, the contrast, the saturation and the hue of the image. - इमेज की चमक, कंट्रास्ट, सैचुरेशन और ह्यू बदलता है। - - - + Brightness चमक - + Added to each colour: below 0 darker, above 0 lighter. हर रंग में जोड़ा जाता है: 0 से कम पर गहरा, 0 से ज़्यादा पर हल्का। - + Contrast कंट्रास्ट - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. रंग बीच के स्लेटी से कितने दूर हैं: 0 % पर सब स्लेटी, 100 % पर कोई बदलाव नहीं। - + Saturation सैचुरेशन - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. रंग कितने चटख हैं: 0 % पर स्लेटी के शेड, 100 % पर कोई बदलाव नहीं। - + Hue ह्यू - + Turns the colours around the colour wheel, by this angle. रंगों को कलर व्हील पर इस कोण से घुमाता है। - + Color Wheel कलर व्हील - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. कलर व्हील, सर्पिल, संकेंद्रित वलय और ध्रुवीय चेकरबोर्ड, सीधे या मुड़े हुए, सेटिंग्स के एक ही सेट से। - + Geometry ज्यामिति - + Segments सेगमेंट - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. वृत्त के चारों ओर हिस्सों की संख्या; 1 पर यह पूरा रहता है। दो रंगों के पैलेट के साथ, विषम संख्या उससे नीचे की सम संख्या देती है, ताकि रंग चारों ओर बारी-बारी से आएँ। - + Rings वलय - + Number of rings from the centre to the edge of the disk; 0 for none. केंद्र से डिस्क के किनारे तक वलयों की संख्या; 0 पर कोई नहीं। - + Twist ट्विस्ट - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. सेगमेंट को सर्पिल में लपेटता है: केंद्र से डिस्क के किनारे तक वे जितने चक्कर लगाते हैं। ऋणात्मक मान दूसरी दिशा में लपेटते हैं। - + Smoothness स्मूदनेस - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. पड़ोसी रंगों के बीच इंटरपोलेशन: 0 पर तीखा, 100% पर लगातार। - + Color रंग + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette पैलेट - + The colours of the pattern, in the order of their cycle. पैटर्न के रंग, उनके चक्र के क्रम में। - + Spectrum स्पेक्ट्रम - + Monochromatic एकवर्णी - + Grayscale ग्रेस्केल - + Black and White श्वेत-श्याम - + Complementary पूरक - + Analogous सदृश - + Triadic त्रिक - + Hue Shift ह्यू शिफ़्ट - + Turns the hue of every colour; greys stay as they are. हर रंग का ह्यू घुमाता है; स्लेटी रंग जैसे हैं वैसे रहते हैं। - + Radial Color रेडियल रंग - + Radial Saturation रेडियल सैचुरेशन - + Positive: grey centre; negative: grey circumference. The lightness is kept. धनात्मक: स्लेटी केंद्र; ऋणात्मक: स्लेटी परिधि। लाइटनेस बनी रहती है। - + Radial Lightness रेडियल लाइटनेस - + Positive: white centre; negative: black centre. धनात्मक: सफ़ेद केंद्र; ऋणात्मक: काला केंद्र। - + Radial Falloff रेडियल फ़ॉलऑफ़ - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. दोनों रेडियल ग्रेडिएंट का वक्र: 1 से कम पर फैला हुआ, 1 पर रैखिक, 1 से ज़्यादा पर केंद्रित। - + Reverse Radial Gradient उल्टा रेडियल ग्रेडिएंट - + Swaps the centre and the circumference in both radial gradients. दोनों रेडियल ग्रेडिएंट में केंद्र और परिधि की अदला-बदली करता है। - + Animation एनिमेशन - + Speed गति - + How fast the pattern turns; 0 keeps it still. पैटर्न कितनी तेज़ी से घूमता है; 0 पर यह स्थिर रहता है। - + Reverse उल्टा - + Turns the pattern the other way. पैटर्न को दूसरी दिशा में घुमाता है। - + Flow प्रवाह - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. वलय केंद्र से कितनी तेज़ी से दूर जाते हैं, त्रिज्या प्रति मिनट में, उनकी संख्या चाहे जो हो: 6 पर, एक वलय 10 सेकंड में केंद्र से किनारे तक जाता है; 0 पर वे स्थिर रहते हैं। - + Flow Inward अंदर की ओर प्रवाह - + Moves the rings towards the centre. वलयों को केंद्र की ओर ले जाता है। - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid ग्रिड - + Lines of a colour on a background, along the borders and between columns and rows. पृष्ठभूमि पर एक रंग की रेखाएँ, किनारों के साथ और कॉलम व पंक्तियों के बीच। - + Columns कॉलम - + The number of columns between the lines. रेखाओं के बीच कॉलम की संख्या। - + Rows पंक्तियाँ - + The number of rows between the lines. रेखाओं के बीच पंक्तियों की संख्या। - + Thickness मोटाई - + The thickness of the lines. रेखाओं की मोटाई। - + The colour between the lines. रेखाओं के बीच का रंग। - + Line Color रेखा का रंग - + The colour of the lines. रेखाओं का रंग। + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_pt.ts b/translations/mapmap_pt.ts index f030ed07..9eaa2769 100644 --- a/translations/mapmap_pt.ts +++ b/translations/mapmap_pt.ts @@ -731,310 +731,1035 @@ Ajuste de cor - - Changes the brightness, the contrast, the saturation and the hue of the image. - Altera o brilho, o contraste, a saturação e o matiz da imagem. - - - + Brightness Brilho - + Added to each colour: below 0 darker, above 0 lighter. Somado a cada cor: abaixo de 0 mais escuro, acima de 0 mais claro. - + Contrast Contraste - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. Quanto as cores se afastam do cinza médio: 0 % é todo cinza, 100 % sem alteração. - + Saturation Saturação - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. Quão vivas são as cores: 0 % são tons de cinza, 100 % sem alteração. - + Hue Matiz - + Turns the colours around the colour wheel, by this angle. Gira as cores ao redor da roda de cores, por este ângulo. - + Color Wheel Roda de cores - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. Rodas de cores, espirais, anéis concêntricos e tabuleiros de xadrez polares, retos ou torcidos, a partir de um só conjunto de parâmetros. - + Geometry Geometria - + Segments Segmentos - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. Número de partes ao redor do círculo; 1 o mantém inteiro. Com uma paleta de duas cores, um número ímpar dá o número par abaixo, para que as cores se alternem em toda a volta. - + Rings Anéis - + Number of rings from the centre to the edge of the disk; 0 for none. Número de anéis do centro até a borda do disco; 0 para nenhum. - + Twist Torção - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. Enrola os segmentos em espirais: as voltas que eles dão do centro até a borda do disco. Valores negativos enrolam no outro sentido. - + Smoothness Suavidade - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. Interpolação entre cores vizinhas: nítida em 0, contínua em 100%. - + Color Cor + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette Paleta - + The colours of the pattern, in the order of their cycle. As cores do padrão, na ordem do seu ciclo. - + Spectrum Espectro - + Monochromatic Monocromática - + Grayscale Tons de cinza - + Black and White Preto e branco - + Complementary Complementar - + Analogous Análoga - + Triadic Triádica - + Hue Shift Mudança de matiz - + Turns the hue of every colour; greys stay as they are. Gira o matiz de cada cor; os cinzas ficam como estão. - + Radial Color Cor radial - + Radial Saturation Saturação radial - + Positive: grey centre; negative: grey circumference. The lightness is kept. Positivo: centro cinza; negativo: circunferência cinza. A luminosidade é mantida. - + Radial Lightness Luminosidade radial - + Positive: white centre; negative: black centre. Positivo: centro branco; negativo: centro preto. - + Radial Falloff Atenuação radial - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. A curva dos dois gradientes radiais: ampla abaixo de 1, linear em 1, concentrada acima de 1. - + Reverse Radial Gradient Inverter gradiente radial - + Swaps the centre and the circumference in both radial gradients. Troca o centro e a circunferência nos dois gradientes radiais. - + Animation Animação - + Speed Velocidade - + How fast the pattern turns; 0 keeps it still. A rapidez com que o padrão gira; 0 o mantém parado. - + Reverse Inverter - + Turns the pattern the other way. Gira o padrão no outro sentido. - + Flow Fluxo - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. A rapidez com que os anéis se afastam do centro, em raios por minuto, seja qual for o seu número: em 6, um anel vai do centro até a borda em 10 segundos; 0 os mantém parados. - + Flow Inward Fluxo para dentro - + Moves the rings towards the centre. Move os anéis em direção ao centro. - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid Grade - + Lines of a colour on a background, along the borders and between columns and rows. Traços de uma cor sobre um fundo, ao longo das bordas e entre as colunas e as linhas. - + Columns Colunas - + The number of columns between the lines. O número de colunas entre os traços. - + Rows Linhas - + The number of rows between the lines. O número de linhas entre os traços. - + Thickness Espessura - + The thickness of the lines. A espessura dos traços. - + The colour between the lines. A cor entre os traços. - + Line Color Cor dos traços - + The colour of the lines. A cor dos traços. + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_ru.ts b/translations/mapmap_ru.ts index 52bedb94..3eba665b 100644 --- a/translations/mapmap_ru.ts +++ b/translations/mapmap_ru.ts @@ -731,310 +731,1035 @@ Коррекция цвета - - Changes the brightness, the contrast, the saturation and the hue of the image. - Меняет яркость, контраст, насыщенность и тон изображения. - - - + Brightness Яркость - + Added to each colour: below 0 darker, above 0 lighter. Прибавляется к каждому цвету: ниже 0 — темнее, выше 0 — светлее. - + Contrast Контраст - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. Насколько цвета удалены от среднего серого: 0 % — всё серое, 100 % — без изменений. - + Saturation Насыщенность - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. Насколько цвета яркие: 0 % — оттенки серого, 100 % — без изменений. - + Hue Тон - + Turns the colours around the colour wheel, by this angle. Поворачивает цвета по цветовому кругу на этот угол. - + Color Wheel Цветовой круг - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. Цветовые круги, спирали, концентрические кольца и полярные шахматки, прямые или закрученные, из одного набора параметров. - + Geometry Геометрия - + Segments Сегменты - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. Число частей по кругу; 1 оставляет круг целым. С палитрой из двух цветов нечётное число заменяется ближайшим меньшим чётным, чтобы цвета чередовались по всему кругу. - + Rings Кольца - + Number of rings from the centre to the edge of the disk; 0 for none. Число колец от центра до края диска; 0 — без колец. - + Twist Закрутка - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. Закручивает сегменты в спирали: число оборотов от центра до края диска. Отрицательные значения закручивают в другую сторону. - + Smoothness Плавность - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. Переход между соседними цветами: резкий при 0, непрерывный при 100%. - + Color Цвет + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette Палитра - + The colours of the pattern, in the order of their cycle. Цвета узора в порядке их цикла. - + Spectrum Спектр - + Monochromatic Монохромная - + Grayscale Оттенки серого - + Black and White Чёрно-белая - + Complementary Дополнительные - + Analogous Аналоговые - + Triadic Триада - + Hue Shift Сдвиг тона - + Turns the hue of every colour; greys stay as they are. Поворачивает тон каждого цвета; серые остаются как есть. - + Radial Color Радиальный цвет - + Radial Saturation Радиальная насыщенность - + Positive: grey centre; negative: grey circumference. The lightness is kept. Положительное значение: серый центр; отрицательное: серая окружность. Светлота сохраняется. - + Radial Lightness Радиальная светлота - + Positive: white centre; negative: black centre. Положительное значение: белый центр; отрицательное: чёрный центр. - + Radial Falloff Радиальный спад - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. Кривая обоих радиальных градиентов: широкая ниже 1, линейная при 1, сжатая выше 1. - + Reverse Radial Gradient Обратный радиальный градиент - + Swaps the centre and the circumference in both radial gradients. Меняет местами центр и окружность в обоих радиальных градиентах. - + Animation Анимация - + Speed Скорость - + How fast the pattern turns; 0 keeps it still. Как быстро вращается узор; 0 — узор неподвижен. - + Reverse Обратно - + Turns the pattern the other way. Вращает узор в другую сторону. - + Flow Поток - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. Как быстро кольца удаляются от центра, в радиусах в минуту, при любом их числе: при 6 кольцо проходит от центра до края за 10 секунд; 0 — кольца неподвижны. - + Flow Inward Поток внутрь - + Moves the rings towards the centre. Двигает кольца к центру. - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid Решётка - + Lines of a colour on a background, along the borders and between columns and rows. Линии одного цвета на фоне — по краям и между столбцами и строками. - + Columns Столбцы - + The number of columns between the lines. Число столбцов между линиями. - + Rows Строки - + The number of rows between the lines. Число строк между линиями. - + Thickness Толщина - + The thickness of the lines. Толщина линий. - + The colour between the lines. Цвет между линиями. - + Line Color Цвет линий - + The colour of the lines. Цвет линий. + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_zh_CN.ts b/translations/mapmap_zh_CN.ts index 37d0efd1..ce6bf253 100644 --- a/translations/mapmap_zh_CN.ts +++ b/translations/mapmap_zh_CN.ts @@ -731,310 +731,1035 @@ 颜色调整 - - Changes the brightness, the contrast, the saturation and the hue of the image. - 调整图像的亮度、对比度、饱和度和色相。 - - - + Brightness 亮度 - + Added to each colour: below 0 darker, above 0 lighter. 加到每种颜色上:小于 0 变暗,大于 0 变亮。 - + Contrast 对比度 - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. 颜色与中灰的距离:0 % 为全灰,100 % 不变。 - + Saturation 饱和度 - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. 颜色的鲜艳程度:0 % 为灰度,100 % 不变。 - + Hue 色相 - + Turns the colours around the colour wheel, by this angle. 将颜色沿色轮旋转此角度。 - + Color Wheel 色轮 - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. 用同一组设置生成色轮、螺旋、同心圆环和极坐标棋盘格,可直可扭。 - + Geometry 几何 - + Segments 分段 - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. 圆周上的分段数;1 表示不分段。调色板只有两种颜色时,奇数会取下一个较小的偶数,使颜色在整圈交替。 - + Rings 圆环 - + Number of rings from the centre to the edge of the disk; 0 for none. 从圆心到圆盘边缘的圆环数;0 表示没有。 - + Twist 扭曲 - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. 将分段卷成螺旋:即从圆心到圆盘边缘所绕的圈数。负值反向卷绕。 - + Smoothness 平滑度 - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. 相邻颜色之间的插值:0 时边界清晰,100% 时连续过渡。 - + Color 颜色 + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette 调色板 - + The colours of the pattern, in the order of their cycle. 图案的颜色,按循环顺序排列。 - + Spectrum 光谱 - + Monochromatic 单色 - + Grayscale 灰度 - + Black and White 黑白 - + Complementary 互补色 - + Analogous 类似色 - + Triadic 三色组 - + Hue Shift 色相偏移 - + Turns the hue of every colour; greys stay as they are. 旋转每种颜色的色相;灰色保持不变。 - + Radial Color 径向颜色 - + Radial Saturation 径向饱和度 - + Positive: grey centre; negative: grey circumference. The lightness is kept. 正值:中心为灰色;负值:圆周为灰色。明度保持不变。 - + Radial Lightness 径向明度 - + Positive: white centre; negative: black centre. 正值:中心为白色;负值:中心为黑色。 - + Radial Falloff 径向衰减 - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. 两种径向渐变的曲线:小于 1 时较宽,等于 1 时线性,大于 1 时集中。 - + Reverse Radial Gradient 反转径向渐变 - + Swaps the centre and the circumference in both radial gradients. 在两种径向渐变中交换中心与圆周。 - + Animation 动画 - + Speed 速度 - + How fast the pattern turns; 0 keeps it still. 图案旋转的速度;0 表示静止。 - + Reverse 反向 - + Turns the pattern the other way. 使图案反向旋转。 - + Flow 流动 - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. 圆环离开圆心的速度,单位为每分钟半径数,与圆环数量无关:为 6 时,一个圆环用 10 秒从圆心移到边缘;0 表示静止。 - + Flow Inward 向内流动 - + Moves the rings towards the centre. 使圆环向圆心移动。 - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid 网格线 - + Lines of a colour on a background, along the borders and between columns and rows. 背景上的单色线条,沿边框并位于各列与各行之间。 - + Columns 列数 - + The number of columns between the lines. 线条之间的列数。 - + Rows 行数 - + The number of rows between the lines. 线条之间的行数。 - + Thickness 粗细 - + The thickness of the lines. 线条的粗细。 - + The colour between the lines. 线条之间的颜色。 - + Line Color 线条颜色 - + The colour of the lines. 线条的颜色。 + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source diff --git a/translations/mapmap_zh_TW.ts b/translations/mapmap_zh_TW.ts index 03ad1e8e..f1320779 100644 --- a/translations/mapmap_zh_TW.ts +++ b/translations/mapmap_zh_TW.ts @@ -731,310 +731,1035 @@ 色彩調整 - - Changes the brightness, the contrast, the saturation and the hue of the image. - 調整影像的亮度、對比、飽和度和色相。 - - - + Brightness 亮度 - + Added to each colour: below 0 darker, above 0 lighter. 加到每個顏色上:低於 0 較暗,高於 0 較亮。 - + Contrast 對比 - + How far the colours are from middle grey: 0 % is all grey, 100 % unchanged. 顏色與中灰的差距:0 % 為全灰,100 % 不變。 - + Saturation 飽和度 - + How vivid the colours are: 0 % is shades of grey, 100 % unchanged. 顏色的鮮豔程度:0 % 為灰階,100 % 不變。 - + Hue 色相 - + Turns the colours around the colour wheel, by this angle. 依此角度沿色輪轉動顏色。 - + Color Wheel 色輪 - + Colour wheels, spirals, concentric rings and polar checkerboards, straight or twisted, from one set of settings. 以同一組設定產生色輪、螺旋、同心圓環和極座標棋盤格,可為直線或扭轉。 - + Geometry 幾何 - + Segments 扇區 - + Number of parts around the circle; 1 keeps it whole. With a palette of two colours, an odd number gives the even number below, so that the colours alternate all around. 圓周上的分區數;1 表示保持完整。調色盤為兩種顏色時,奇數會改用小一號的偶數,讓顏色在整圈交替。 - + Rings 圓環 - + Number of rings from the centre to the edge of the disk; 0 for none. 從圓心到圓盤邊緣的圓環數;0 表示沒有圓環。 - + Twist 扭轉 - + Winds the segments into spirals: the turns they make from the centre to the edge of the disk. Negative values wind the other way. 將扇區捲成螺旋:即從圓心到圓盤邊緣所轉的圈數。負值會往另一個方向捲。 - + Smoothness 平滑度 - + Interpolation between neighbouring colours: sharp at 0, continuous at 100%. 相鄰顏色之間的內插:0 時銳利,100% 時連續。 - + Color 顏色 + + + Changes the brightness, the contrast, the saturation and the hue of the image, its levels and the gain of each colour. + + + + + Levels + + + + + Black Point + + + + + Colours this dark or darker become black. + + + + + White Point + + + + + Colours this light or lighter become white. + + + + + Gamma + + + + + Above 1 the middle tones are lighter, below 1 darker; black and white stay. + + + + + Output Black + + + + + What black becomes: above 0 % it is lifted to a grey. + + + + + Output White + + + + + What white becomes: below 100 % it is dimmed to a grey. + + + Channels + + + + + Red + + + + + Multiplies the red of each pixel: 0 % removes it, 100 % keeps it. + + + + + Green + + + + + Multiplies the green of each pixel: 0 % removes it, 100 % keeps it. + + + + + Blue + + + + + Multiplies the blue of each pixel: 0 % removes it, 100 % keeps it. + + + + Palette 調色盤 - + The colours of the pattern, in the order of their cycle. 圖樣的顏色,依其循環順序排列。 - + Spectrum 光譜 - + Monochromatic 單色 - + Grayscale 灰階 - + Black and White 黑白 - + Complementary 互補色 - + Analogous 類似色 - + Triadic 三元色 - + Hue Shift 色相偏移 - + Turns the hue of every colour; greys stay as they are. 轉動每個顏色的色相;灰色維持不變。 - + Radial Color 放射狀顏色 - + Radial Saturation 放射狀飽和度 - + Positive: grey centre; negative: grey circumference. The lightness is kept. 正值:中心為灰;負值:圓周為灰。明度維持不變。 - + Radial Lightness 放射狀明度 - + Positive: white centre; negative: black centre. 正值:中心為白;負值:中心為黑。 - + Radial Falloff 放射狀衰減 - + The curve of both radial gradients: broad below 1, linear at 1, concentrated above 1. 兩個放射狀漸層的曲線:低於 1 較寬,等於 1 為線性,高於 1 較集中。 - + Reverse Radial Gradient 反轉放射狀漸層 - + Swaps the centre and the circumference in both radial gradients. 在兩個放射狀漸層中對調中心與圓周。 - + Animation 動畫 - + Speed 速度 - + How fast the pattern turns; 0 keeps it still. 圖樣轉動的速度;0 表示靜止。 - + Reverse 反向 - + Turns the pattern the other way. 讓圖樣往另一個方向轉動。 - + Flow 流動 - + How fast the rings move away from the centre, in radii per minute, whatever their number: at 6, a ring goes from the centre to the edge in 10 seconds; 0 keeps them still. 圓環離開中心的速度,以每分鐘半徑數計,與圓環數量無關:設為 6 時,一個圓環在 10 秒內從中心移到邊緣;0 表示靜止。 - + Flow Inward 向內流動 - + Moves the rings towards the centre. 讓圓環向中心移動。 - + + Colorize + + + + + Colours the image with two colours: one for the dark, one for the light, and the shades between. + + + + + Dark Color + + + + + The colour that black becomes. + + + + + Light Color + + + + + The colour that white becomes. + + + + + Options + + + + + Tone From + + + + + How light a pixel is: as the eye sees it, by its strongest channel, or by the mean of its channels. + + + + + Luminance + + + + + Maximum + + + + + Average + + + + + Gradient + + + + + A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. + + + + + Shape + + + + + Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. + + + + + Linear + + + + + Radial + + + + + Conic + + + + + Diamond + + + + + Angle + + + + + The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. + + + + + Center + + + + + The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. + + + + + Repeats + + + + + How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. + + + + + Mirror + + + + + Each repeat goes from the first colour to the last and back, with no edge between repeats. + + + + + Hardness + + + + + 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. + + + + + Color A + + + + + The first colour. + + + + + Color B + + + + + The second colour, the last one with two colours. + + + + + Color C + + + + + The third colour, used with Three Colors. + + + + + Three Colors + + + + + Goes from Color A to Color B, then to Color C. + + + + + Swap Colors + + + + + Swaps the first and the last colour. + + + + + Blend + + + + + How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. + + + + + RGB + + + + + Rainbow + + + + + How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. + + + + + The gradient moves the other way: towards the centre, or anticlockwise. + + + + Grid 格線 - + Lines of a colour on a background, along the borders and between columns and rows. 在背景上繪製某種顏色的線條,沿著邊框以及欄與列之間。 - + Columns 欄數 - + The number of columns between the lines. 線條之間的欄數。 - + Rows 列數 - + The number of rows between the lines. 線條之間的列數。 - + Thickness 粗細 - + The thickness of the lines. 線條的粗細。 - + The colour between the lines. 線條之間的顏色。 - + Line Color 線條顏色 - + The colour of the lines. 線條的顏色。 + + + Invert + + + + + Inverts the colours of the image, as a photographic negative. + + + + + Keep Colors + + + + + Inverts the light and the dark but keeps the colours: red stays red, lighter or darker. + + + + + Threshold + + + + + Only what is at least this light is inverted, as a solarized photograph. + + + + + Inverts the red, unless the colours are kept. + + + + + Inverts the green, unless the colours are kept. + + + + + Inverts the blue, unless the colours are kept. + + + + + Luma Key + + + + + Makes the dark parts of the image transparent, or the light ones, to show what is behind. + + + + + Keying + + + + + Low Threshold + + + + + Darker than this, a pixel is transparent; lighter when inverted, it is opaque. + + + + + High Threshold + + + + + Lighter than this, a pixel is opaque; transparent when inverted. Between the two, it fades. + + + + + Removes the light parts instead of the dark ones. + + + + + Channel + + + + + What is compared with the thresholds: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Noise + + + + + Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. + + + + + Kind + + + + + Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. + + + + + Smooth + + + + + Cells + + + + + Plasma + + + + + Scale + + + + + How many clouds, cells or waves cross the image. + + + + + Detail + + + + + How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. + + + + + Seed + + + + + Changes the pattern: each number gives another one, always the same. + + + + + The colour of the low values. + + + + + The colour of the high values. + + + + + How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. + + + + + The noise goes through its motion the other way. + + + + + Posterize + + + + + Reduces the image to a few levels of each colour, in flat bands, as a poster. + + + + + The number of levels of each colour, black and full included. + + + + + Softness + + + + + Shades between the bands: 0 % gives sharp edges, 100 % no bands. + + + + + Dithering + + + + + Mixes the pixels of two neighbouring levels in a fine pattern, to suggest the shades between. + + + + + Brightness Only + + + + + Keeps the colours and reduces only their brightness to levels. + + + + + Stripes + + + + + Stripes of two colours, at any angle and width, going by. + + + + + How many pairs of stripes, one of each colour, cross the image. + + + + + The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. + + + + + Width + + + + + The share of each pair taken by the stripe of Color A. + + + + + How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. + + + + + The colour of every other stripe. + + + + + The colour of the stripes between. + + + + + How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. + + + + + The stripes go by the other way. + + + + + Turns the image into two colours: what is darker than the threshold, and what is lighter. + + + + + Below it a pixel takes the dark colour, above it the light colour. + + + + + The width of the shades between the two colours, around the threshold: 0 % gives a sharp edge. + + + + + What is compared with the threshold: the brightness seen by the eye, one channel, or the strongest of the three. + + + + + Colors + + + + + The colour of what is below the threshold. + + + + + The colour of what is above the threshold. + + + + + Transparent + + + + + Which side lets what is behind show through instead of its colour. + + + + + None + + + + + Dark + + + + + Light + + + + + Waves + + + + + Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. + + + + + Lines are straight waves across the image; rings go out from the centre. + + + + + Lines + + + + + The direction in which straight waves go, clockwise from left to right. Rings do not use it. + + + + + The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. + + + + + How many waves cross the image, or go from the centre to the edge. + + + + + Sharpness + + + + + 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. + + + + + The colour of the troughs. + + + + + The colour of the crests. + + + + + How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. + + + + + The waves go the other way: rings come towards the centre. + + Source From 67ec533f3deeb33c6f812386aab3781ecbfcff50 Mon Sep 17 00:00:00 2001 From: Sofian Audry Date: Fri, 4 Dec 2026 11:08:44 -0500 Subject: [PATCH 11/11] Translate the four new generators into French and Spanish --- translations/mapmap_es.ts | 152 +++++++++++++++++++------------------- translations/mapmap_fr.ts | 152 +++++++++++++++++++------------------- 2 files changed, 152 insertions(+), 152 deletions(-) diff --git a/translations/mapmap_es.ts b/translations/mapmap_es.ts index 359a6392..788a4c58 100644 --- a/translations/mapmap_es.ts +++ b/translations/mapmap_es.ts @@ -1133,172 +1133,172 @@ Gradient - + Degradado A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. - + Un degradado de dos o tres colores, lineal, radial, cónico o en rombo, repetido, en espejo, que se desplaza a lo largo de su forma. Shape - + Forma Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. - + Lineal atraviesa la imagen; radial sale del centro en círculos; cónico gira alrededor del centro; rombo sale del centro en cuadrados apoyados en una esquina. Linear - + Lineal Radial - + Radial Conic - + Cónico Diamond - + Rombo Angle - + Ángulo The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. - + La dirección de un degradado lineal, en el sentido de las agujas del reloj desde la izquierda hacia la derecha; dónde empieza un degradado cónico; cómo gira un rombo. Un degradado radial no lo usa. Center - + Centro The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. - + El centro de un degradado radial, cónico o en rombo, desde la esquina superior izquierda (0, 0) hasta la esquina inferior derecha (1, 1). Un degradado lineal no lo usa. Repeats - + Repeticiones How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. - + Cuántas veces se repite el degradado de un lado a otro de la imagen, del centro al borde, o alrededor del centro, donde se redondea a un número entero. Mirror - + Espejo Each repeat goes from the first colour to the last and back, with no edge between repeats. - + Cada repetición va del primer color al último y vuelve, sin borde entre repeticiones. Hardness - + Dureza 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. - + 0 funde los colores suavemente; 100 % da bandas de color liso con bordes nítidos. Color A - + Color A The first colour. - + El primer color. Color B - + Color B The second colour, the last one with two colours. - + El segundo color, el último con dos colores. Color C - + Color C The third colour, used with Three Colors. - + El tercer color, usado con Tres colores. Three Colors - + Tres colores Goes from Color A to Color B, then to Color C. - + Va del color A al color B, y luego al color C. Swap Colors - + Intercambiar colores Swaps the first and the last colour. - + Intercambia el primer y el último color. Blend - + Mezcla How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. - + Cómo un color se convierte en el siguiente: RGB en línea recta; Tono pasando por los tonos, por el camino más corto de la rueda de color; Arco iris por el más largo, todos los tonos cuando ambos colores tienen el mismo. Un gris toma el tono del otro color. RGB - + RGB Rainbow - + Arco iris How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. - + Cuántas repeticiones pasan en un minuto: a 6, el degradado avanza una repetición cada 10 segundos; 0 lo deja quieto. The gradient moves the other way: towards the centre, or anticlockwise. - + El degradado se desplaza en el otro sentido: hacia el centro, o en sentido contrario a las agujas del reloj. @@ -1453,87 +1453,87 @@ Noise - + Ruido Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. - + Un ruido que se mueve despacio: nubes suaves, celdas o un plasma, entre dos colores. Kind - + Tipo Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. - + Suave da nubes suaves; Celdas, celdas alrededor de puntos que se desplazan; Plasma, ondas que se cruzan. Smooth - + Suave Cells - + Celdas Plasma - + Plasma Scale - + Escala How many clouds, cells or waves cross the image. - + Cuántas nubes, celdas u ondas hay de un lado a otro de la imagen. Detail - + Detalle How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. - + Cuántas capas de ruido cada vez más fino, u ondas para el plasma, se suman. Cada capa cuesta tiempo de dibujo; las celdas tienen una sola capa. Seed - + Semilla Changes the pattern: each number gives another one, always the same. - + Cambia el motivo: cada número da otro, siempre el mismo. The colour of the low values. - + El color de los valores bajos. The colour of the high values. - + El color de los valores altos. How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. - + Cuántas veces por minuto el ruido hace su movimiento y vuelve a su punto de partida: a 6, cada 10 segundos; 0 lo deja quieto. The noise goes through its motion the other way. - + El ruido hace su movimiento en el otro sentido. @@ -1553,7 +1553,7 @@ Softness - + Difuminado @@ -1583,57 +1583,57 @@ Stripes - + Rayas Stripes of two colours, at any angle and width, going by. - + Rayas de dos colores, de cualquier ángulo y anchura, que se desplazan. How many pairs of stripes, one of each colour, cross the image. - + Cuántos pares de rayas, una de cada color, hay de un lado a otro de la imagen. The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. - + La dirección a través de las rayas, en el sentido de las agujas del reloj desde la izquierda hacia la derecha: a 0°, las rayas son verticales. Width - + Anchura The share of each pair taken by the stripe of Color A. - + La parte de cada par que ocupa la raya del color A. How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. - + El ancho de la fusión entre dos rayas, en píxeles de la imagen: 0 da bordes nítidos. The colour of every other stripe. - + El color de una de cada dos rayas. The colour of the stripes between. - + El color de las rayas intermedias. How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. - + Cuántos pares de rayas pasan en un minuto: a 6, las rayas avanzan un par cada 10 segundos; 0 las deja quietas. The stripes go by the other way. - + Las rayas se desplazan en el otro sentido. @@ -1698,67 +1698,67 @@ Waves - + Ondas Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. - + Ondas de dos colores, en líneas rectas o en anillos alrededor de un centro, suaves o nítidas, que avanzan. Lines are straight waves across the image; rings go out from the centre. - + Líneas da ondas rectas que atraviesan la imagen; anillos, ondas que salen del centro. Lines - + Líneas The direction in which straight waves go, clockwise from left to right. Rings do not use it. - + La dirección de las ondas rectas, en el sentido de las agujas del reloj desde la izquierda hacia la derecha. Los anillos no la usan. The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. - + El centro de los anillos, desde la esquina superior izquierda (0, 0) hasta la esquina inferior derecha (1, 1). Las ondas rectas no lo usan. How many waves cross the image, or go from the centre to the edge. - + Cuántas ondas hay de un lado a otro de la imagen, o del centro al borde. Sharpness - + Nitidez 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. - + 0 da ondas suaves, una sinusoide; 100 % da bandas de color liso con bordes nítidos. The colour of the troughs. - + El color de los valles. The colour of the crests. - + El color de las crestas. How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. - + Cuántas ondas pasan en un minuto: a 6, las ondas avanzan una onda cada 10 segundos; 0 las deja quietas. The waves go the other way: rings come towards the centre. - + Las ondas van en el otro sentido: los anillos vienen hacia el centro. diff --git a/translations/mapmap_fr.ts b/translations/mapmap_fr.ts index 95596d14..3c42232a 100644 --- a/translations/mapmap_fr.ts +++ b/translations/mapmap_fr.ts @@ -1133,172 +1133,172 @@ Gradient - + Dégradé A gradient of two or three colours, linear, radial, conic or in a diamond, repeated, mirrored and moving along its shape. - + Un dégradé de deux ou trois couleurs, linéaire, radial, conique ou en losange, répété, en miroir, qui défile le long de sa forme. Shape - + Forme Linear goes across the image; radial goes out from the centre in circles; conic goes around the centre; diamond goes out from the centre in squares on their corners. - + Linéaire traverse l'image; radial part du centre en cercles; conique tourne autour du centre; losange part du centre en carrés posés sur la pointe. Linear - + Linéaire Radial - + Radial Conic - + Conique Diamond - + Losange Angle - + Angle The direction of a linear gradient, clockwise from left to right; where a conic gradient starts; how a diamond is turned. A radial gradient does not use it. - + La direction d'un dégradé linéaire, dans le sens des aiguilles d'une montre depuis la gauche vers la droite; le départ d'un dégradé conique; la rotation d'un losange. Un dégradé radial ne s'en sert pas. Center - + Centre The centre of a radial, conic or diamond gradient, from the top left corner (0, 0) to the bottom right corner (1, 1). A linear gradient does not use it. - + Le centre d'un dégradé radial, conique ou en losange, du coin en haut à gauche (0, 0) au coin en bas à droite (1, 1). Un dégradé linéaire ne s'en sert pas. Repeats - + Répétitions How many times the gradient repeats across the image, from the centre to the edge, or around the centre, where it is rounded to a whole number. - + Le nombre de fois que le dégradé se répète d'un bord à l'autre de l'image, du centre au bord, ou autour du centre, où il est arrondi à un nombre entier. Mirror - + Miroir Each repeat goes from the first colour to the last and back, with no edge between repeats. - + Chaque répétition va de la première couleur à la dernière et revient, sans cassure entre les répétitions. Hardness - + Dureté 0 blends the colours smoothly; 100 % gives bands of plain colour with sharp edges. - + 0 fond les couleurs en douceur; 100 % donne des bandes de couleur unie aux bords nets. Color A - + Couleur A The first colour. - + La première couleur. Color B - + Couleur B The second colour, the last one with two colours. - + La deuxième couleur, la dernière avec deux couleurs. Color C - + Couleur C The third colour, used with Three Colors. - + La troisième couleur, utilisée avec Trois couleurs. Three Colors - + Trois couleurs Goes from Color A to Color B, then to Color C. - + Va de la couleur A à la couleur B, puis à la couleur C. Swap Colors - + Échanger les couleurs Swaps the first and the last colour. - + Échange la première et la dernière couleur. Blend - + Mélange How one colour turns into the next: RGB in a straight line; Hue through the hues, the shorter way round the colour wheel; Rainbow the longer way round, all the hues when both colours have the same. A grey takes the hue of the other colour. - + Comment une couleur devient la suivante : RVB en ligne droite; Teinte en passant par les teintes, par le plus court chemin sur la roue chromatique; Arc-en-ciel par le plus long, toutes les teintes quand les deux couleurs ont la même. Un gris prend la teinte de l'autre couleur. RGB - + RVB Rainbow - + Arc-en-ciel How many repeats go by in a minute: at 6, the gradient moves by one repeat every 10 seconds; 0 keeps it still. - + Le nombre de répétitions qui défilent en une minute : à 6, le dégradé avance d'une répétition toutes les 10 secondes; 0 le garde immobile. The gradient moves the other way: towards the centre, or anticlockwise. - + Le dégradé défile dans l'autre sens : vers le centre, ou dans le sens inverse des aiguilles d'une montre. @@ -1453,87 +1453,87 @@ Noise - + Bruit Noise that moves slowly: smooth clouds, cells or a plasma, between two colours. - + Un bruit qui bouge lentement : des nuages doux, des cellules ou un plasma, entre deux couleurs. Kind - + Type Smooth gives soft clouds; Cells, cells around points that wander; Plasma, waves that cross each other. - + Doux donne des nuages; Cellules, des cellules autour de points qui se promènent; Plasma, des ondes qui se croisent. Smooth - + Doux Cells - + Cellules Plasma - + Plasma Scale - + Échelle How many clouds, cells or waves cross the image. - + Le nombre de nuages, de cellules ou d'ondes d'un bord à l'autre de l'image. Detail - + Détail How many layers of finer and finer noise, or of waves for the plasma, are added together. Each layer costs time to draw; cells have a single layer. - + Le nombre de couches de bruit de plus en plus fin, ou d'ondes pour le plasma, additionnées. Chaque couche prend du temps à dessiner; les cellules n'ont qu'une couche. Seed - + Graine Changes the pattern: each number gives another one, always the same. - + Change le motif : chaque nombre en donne un autre, toujours le même. The colour of the low values. - + La couleur des valeurs basses. The colour of the high values. - + La couleur des valeurs hautes. How many times a minute the noise goes through its motion and comes back to where it started: at 6, every 10 seconds; 0 keeps it still. - + Le nombre de fois par minute que le bruit fait son mouvement et revient à son point de départ : à 6, toutes les 10 secondes; 0 le garde immobile. The noise goes through its motion the other way. - + Le bruit fait son mouvement dans l'autre sens. @@ -1553,7 +1553,7 @@ Softness - + Douceur @@ -1583,57 +1583,57 @@ Stripes - + Rayures Stripes of two colours, at any angle and width, going by. - + Des rayures de deux couleurs, de tout angle et de toute largeur, qui défilent. How many pairs of stripes, one of each colour, cross the image. - + Le nombre de paires de rayures, une de chaque couleur, d'un bord à l'autre de l'image. The direction across the stripes, clockwise from left to right: at 0°, the stripes stand upright. - + La direction en travers des rayures, dans le sens des aiguilles d'une montre depuis la gauche vers la droite : à 0°, les rayures sont verticales. Width - + Largeur The share of each pair taken by the stripe of Color A. - + La part de chaque paire prise par la rayure de la couleur A. How wide the blend between two stripes is, in pixels of the image: 0 gives sharp edges. - + La largeur du fondu entre deux rayures, en pixels de l'image : 0 donne des bords nets. The colour of every other stripe. - + La couleur d'une rayure sur deux. The colour of the stripes between. - + La couleur des rayures entre les deux. How many pairs of stripes go by in a minute: at 6, the stripes move by one pair every 10 seconds; 0 keeps them still. - + Le nombre de paires de rayures qui défilent en une minute : à 6, les rayures avancent d'une paire toutes les 10 secondes; 0 les garde immobiles. The stripes go by the other way. - + Les rayures défilent dans l'autre sens. @@ -1698,67 +1698,67 @@ Waves - + Ondes Waves of two colours, in straight lines or in rings around a centre, from soft to sharp, going forward. - + Des ondes de deux couleurs, en lignes droites ou en anneaux autour d'un centre, douces ou nettes, qui avancent. Lines are straight waves across the image; rings go out from the centre. - + Lignes donne des ondes droites qui traversent l'image; anneaux, des ondes qui partent du centre. Lines - + Lignes The direction in which straight waves go, clockwise from left to right. Rings do not use it. - + La direction des ondes droites, dans le sens des aiguilles d'une montre depuis la gauche vers la droite. Les anneaux ne s'en servent pas. The centre of the rings, from the top left corner (0, 0) to the bottom right corner (1, 1). Straight waves do not use it. - + Le centre des anneaux, du coin en haut à gauche (0, 0) au coin en bas à droite (1, 1). Les ondes droites ne s'en servent pas. How many waves cross the image, or go from the centre to the edge. - + Le nombre d'ondes d'un bord à l'autre de l'image, ou du centre au bord. Sharpness - + Netteté 0 gives soft waves, a sine; 100 % gives bands of plain colour with sharp edges. - + 0 donne des ondes douces, une sinusoïde; 100 % donne des bandes de couleur unie aux bords nets. The colour of the troughs. - + La couleur des creux. The colour of the crests. - + La couleur des crêtes. How many waves go by in a minute: at 6, the waves move by one wave every 10 seconds; 0 keeps them still. - + Le nombre d'ondes qui passent en une minute : à 6, les ondes avancent d'une onde toutes les 10 secondes; 0 les garde immobiles. The waves go the other way: rings come towards the centre. - + Les ondes vont dans l'autre sens : les anneaux viennent vers le centre.