shaderlib: Add multipass pixelsorting
This commit is contained in:
parent
bf1c1327ac
commit
3dcc4ca02c
4 changed files with 148 additions and 0 deletions
20
examples/multistep_pixelsort.gdshader
Normal file
20
examples/multistep_pixelsort.gdshader
Normal 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);
|
||||
}
|
1
examples/multistep_pixelsort.gdshader.uid
Normal file
1
examples/multistep_pixelsort.gdshader.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://csk0fg4by651b
|
Loading…
Add table
Add a link
Reference in a new issue