Use Godot's GLSL dialect for color grading and more.
 ## Table of Contents - [Supported Platforms](#supported-platforms) - [Usage](#usage) - [Shaderlib](#shaderlib) - [Commandline interface](#commandline-interface) - [Known Issues](#known-issues) ## Supported Platforms - Linux - Windows You can find the latest release ... - [here (remotebranch.eu)](https://remotebranch.eu/ChaoticByte/Pigment/releases/latest) - [and here (github.com)](https://github.com/ChaoticByte/Pigment/releases/latest) ## Supported Image Formats | Format | Import | Export | Notes | | ------ | :----: | :----: | ----- | | PNG | ✔ | ✔ | exports to 8-bit RGBA | | JPEG | ✔ | | | | WEBP | ✔ | | | ## Usage With Pigment, you process images by writing Shader code using Godot's GLSL dialect: GDShader. If you want to learn GDShader, take a look at the [Godot docs](https://docs.godotengine.org/en/stable/tutorials/shaders/). To get started, use the project template (see the Releases section of this repo) and open it in Godot. The template includes examples that you can use as a starting-point to write your own stuff. After opening the project in Godot, start Pigment and open a `.gdshader` file & an image. Edit the shader using Godots `Shader Editor`, and hit `Apply` in Pigment. ## Shaderlib This repo comes with a (still small) shader library including pre-written functions and more. Have a look at the `shaderlib` folder. Here is an example: ```glsl shader_type canvas_item; #include "./shaderlib/oklab.gdshaderinc" void fragment() { vec4 oklab = rgb2oklab(COLOR); vec4 oklch = oklab2oklch(oklab); oklch.z -= 2.0; COLOR = oklab2rgb(oklch2oklab(oklch)); } ``` ## Commandline interface You can run Pigment from the commandline or scripts. > Note: Headless mode is not supported. Using the commandline interface still opens a window. ### Usage ``` ~ Pigment CLI ~ -=============- Usage: ./Pigment