shaderlib: Remove hsv_multiply and hsv_offset, rename hsv.gdshaderinc to colorspaces.gdshaderinc, update autocomplete and example accordingly; implements #36

This commit is contained in:
ChaoticByte 2025-01-10 21:58:23 +01:00
parent 50ddf6e6d3
commit 3b47d57353
No known key found for this signature in database
3 changed files with 6 additions and 33 deletions

View file

@ -129,14 +129,14 @@ const gdshader_preprocessor = [
]
# shaderlib
var shaderlib_regex = {
"hsv": RegEx.create_from_string(r'\s*\#include\s+\"res\:\/\/shaderlib\/hsv\.gdshaderinc\"'),
"colorspaces": RegEx.create_from_string(r'\s*\#include\s+\"res\:\/\/shaderlib\/colorspaces\.gdshaderinc\"'),
"transform": RegEx.create_from_string(r'\s*\#include\s+\"res\:\/\/shaderlib\/transform\.gdshaderinc\"'),
"transparency": RegEx.create_from_string(r'\s*\#include\s+\"res\:\/\/shaderlib\/transparency\.gdshaderinc\"'),
"effects": RegEx.create_from_string(r'\s*\#include\s+\"res\:\/\/shaderlib\/effects\.gdshaderinc\"'),
"denoise": RegEx.create_from_string(r'\s*\#include\s+\"res\:\/\/shaderlib\/denoise\.gdshaderinc\"')
}
const shaderlib_functions = {
"hsv": ["rgb2hsv", "hsv2rgb", "hsv_offset", "hsv_multiply"],
"colorspaces": ["rgb2hsv", "hsv2rgb"],
"transform": ["place_texture"],
"transparency": ["alpha_blend"],
"effects": ["pixelate"],