Removed presets, load all images via load directives (implements #9), removed obsolete code, added some improvements
This commit is contained in:
parent
53d42de4a5
commit
4b28a6427e
21 changed files with 231 additions and 205 deletions
21
README.md
21
README.md
|
@ -13,23 +13,32 @@ You can find the latest releases [here](https://github.com/ChaoticByte/Fragmente
|
|||
|
||||
## Usage
|
||||
|
||||
The application includes presets. You can use them as a starting-point to write your own filters.
|
||||
Just load an image, apply a preset, edit the code and hit `F5` to see the changes.
|
||||
The repo includes examples. You can use them as a starting-point to write your own filters.
|
||||
Just load an image using `//!load`, edit the shader code and hit `F5` to see the changes.
|
||||
|
||||
### Load additional images using the `//!load` directive
|
||||
### Load TEXTURE using the `//!load` directive
|
||||
|
||||
```glsl
|
||||
//!load <filepath>
|
||||
```
|
||||
|
||||
The image file will be read and available as the `TEXTURE` variable.
|
||||
|
||||
#### Load additional images
|
||||
|
||||
```glsl
|
||||
//!load <name> <filepath>
|
||||
uniform sampler2D <name>;
|
||||
```
|
||||
|
||||
With this you can load additional images into your shader.
|
||||
Have a look at the `Mix` preset:
|
||||
Have a look at the `mix.gdshader` example:
|
||||
|
||||
```glsl
|
||||
shader_type canvas_item;
|
||||
|
||||
//!load img2 ./icon.png
|
||||
//!load ./example1.png
|
||||
|
||||
//!load+ img2 ./example2.jpg
|
||||
uniform sampler2D img2: repeat_enable, filter_nearest;
|
||||
|
||||
void fragment() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue