You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-8Lines changed: 38 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,15 @@
3
3
4
4

5
5
6
-
<palign=center>Create image filters by writing shaders.</p>
6
+
<palign=center>An image editing/compositing software for graphics programmers.</p>
7
+
8
+
## Table of Contents
9
+
10
+
-[Supported Platforms](#supported-platforms)
11
+
-[Usage](#usage)
12
+
-[Shaderlib](#shaderlib)
13
+
-[Commandline interface](#commandline-interface)
14
+
-[Known Issues](#known-issues)
7
15
8
16
## Supported Platforms
9
17
@@ -13,8 +21,12 @@ You can find the latest releases [here](https://github.com/ChaoticByte/Fragmente
13
21
14
22
## Usage
15
23
16
-
The repo includes examples. You can use them as a starting-point to write your own filters.
17
-
Just load an image using `//!load`, edit the shader code and hit `F5` to see the changes.
24
+
With Fragemented, you are editing images by writing GDShaders. This brings almost endless opportunities to create unique art.
25
+
If you want to learn GDShader, take a look at the [Godot docs](https://docs.godotengine.org/en/stable/tutorials/shaders/).
26
+
27
+
The repo also includes examples. You can use them as a starting-point to write your own filters.
28
+
29
+
Besides the regular GDShader stuff, Fragmented also has so-called directives. Those allow to further control the behaviour of the application. The most important directive is `//!load` to load an image.
18
30
19
31
### Load TEXTURE using the `//!load` directive
20
32
@@ -68,12 +80,15 @@ Here is an example:
68
80
```glsl
69
81
shader_type canvas_item;
70
82
71
-
#include "res://shaderlib/hsv.gdshaderinc"
83
+
#include "res://shaderlib/oklab.gdshaderinc"
72
84
73
-
//!load ./examples/images/swamp.jpg
85
+
//!load ./images/swamp.jpg
74
86
75
87
void fragment() {
76
-
COLOR = hsv_offset(COLOR, 0.32, 0.2, 0.0);
88
+
vec4 oklab = rgb2oklab(COLOR);
89
+
vec4 oklch = oklab2oklch(oklab);
90
+
oklch.z -= 2.0;
91
+
COLOR = oklab2rgb(oklch2oklab(oklch));
77
92
}
78
93
```
79
94
@@ -89,14 +104,23 @@ You can run Fragmented from the commandline or scripts.
--output PATH Where to write the resulting image to
107
+
--output PATH Where to write the resulting image to.
108
+
In batch mode, this must be a folder.
93
109
--load-image PATH The path to the image. This will overwrite the
94
-
load directive of the shader file (optional)
110
+
load directive of the shader file.
111
+
Passing a folder activates batch mode.
112
+
(optional)
95
113
96
114
```
97
115
98
116
You can also run `./Fragmented cmd help` to show the help message.
99
117
118
+
### Batch Mode
119
+
120
+
Since version v8.0, you can pass a directory to `--load-image` and `--output`. This will process all images in the input directory and write the output to the output directory.
121
+
122
+
> Note: You *can* use this feature for video frames, but it will take a loooong time.
123
+
100
124
#### Examples
101
125
102
126
```
@@ -106,3 +130,9 @@ You can also run `./Fragmented cmd help` to show the help message.
0 commit comments