Add hsv.gdshaderinc to shaderlibrary, provide an example and update README.md - implement #12

This commit is contained in:
ChaoticByte 2024-12-22 23:04:35 +01:00
parent 862ef075ff
commit 6b748229ed
No known key found for this signature in database
3 changed files with 76 additions and 0 deletions

View file

@ -45,3 +45,22 @@ void fragment() {
COLOR = mix(COLOR, texture(img2, UV), .2);
}
```
## 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 on how to use it (the `hsv.gdshader` example):
```glsl
shader_type canvas_item;
#include "res://shaderlib/hsv.gdshaderinc"
//!load ./swamp.jpg
void fragment() {
COLOR = hsv_offset(COLOR, 0.32, 0.2, 0.0);
}
```