shaderlib: Add multipass pixelsorting

This commit is contained in:
ChaoticByte 2025-04-01 21:37:32 +02:00
parent bf1c1327ac
commit 3dcc4ca02c
No known key found for this signature in database
4 changed files with 148 additions and 0 deletions

View file

@ -0,0 +1,20 @@
shader_type canvas_item;
#include "./shaderlib/pixelsort.gdshaderinc"
//!steps 1500
uniform int STEP;
//!load ./images/mountain.jpg
void fragment() {
// pixel sorting works in multiple steps
COLOR = pixelsort_step(
TEXTURE, UV,
DIRECTION_BOTTOM_TO_TOP,
COLOR_MODE_OKLCH,
{true, false, false},
{-INF, .007, -INF},
{INF, INF, INF},
STEP);
}

View file

@ -0,0 +1 @@
uid://csk0fg4by651b