It would be great if we could have a library of working shaders with examples in Defold, what do you think about such initiative?
@britzl started a great library: https://github.com/britzl/lumiere,
@Pkeod has a great library: https://github.com/subsoap/deffx
@Vincent introduced a blur shader: Blur shader example
@aglitchman shared awesome trails effects: Hyper Trails - customizable trail effect
I hope you’ll find time to develop further, guys
I’m not so advanced in shaders, but I have adopted few 2D shaders from Shadertoy for post-processing of a single image (I think they should work on 3D render too) based on Shadertoy examples (links in fragment programs).
I hope it would be great for new devs who would like to apply some cool effects!
Because those are modified fragment programs I’m calling them:
Defragments:
(Logo made with designevo)
Defragments is just a library of simple examples with fragment programs from Shadertoy adopted to work in Defold. Fragment programs are modifying a sprite in post-processing.
-
Raindrops (thanks to @sven Shadertoy - uniform variables needs explanation (SOLVED))
-
Simple shockwave and shockwave with chromatic abberation:
-
Black and white / grayscale:
-
Rainbow effect
-
Pixelate
-
Edge detection (Sobel filter)
-
Toon shader
-
Water waves
-
Gausian blur and motion blur
It is available to download here and contributions are welcome :
https://github.com/paweljarosz/defragments/tree/master
I’ve made examples in a form of game objects, so you can just replace the main go with other and build for instant result: