All Projects → SableRaf → Filters4processing

SableRaf / Filters4processing

Useful GLSL filters adapted for Processing

Labels

Projects that are alternatives of or similar to Filters4processing

Twigl
twigl.app is an online editor for One tweet shader, with gif generator and sound shader, and broadcast live coding.
Stars: ✭ 145 (-18.08%)
Mutual labels:  glsl
Gaiasky
Mirror of Gaia Sky repository hosted on Gitlab: https://gitlab.com/langurmonkey/gaiasky
Stars: ✭ 162 (-8.47%)
Mutual labels:  glsl
Glsltuto
GLSL shaders tutorial
Stars: ✭ 168 (-5.08%)
Mutual labels:  glsl
Processingstuff
Various pretty-ish Processing sketches by Blokatt. About 50% shaders.
Stars: ✭ 153 (-13.56%)
Mutual labels:  glsl
Graphite
A parallel, distributed simulator for multicores.
Stars: ✭ 157 (-11.3%)
Mutual labels:  glsl
Sparkle
🎇 A modern particle engine running on GPU, using c++14 and OpenGL 4.4.
Stars: ✭ 162 (-8.47%)
Mutual labels:  glsl
Glowingobjectoutlines
A technique for Glowing Object Outlines in Unity.
Stars: ✭ 149 (-15.82%)
Mutual labels:  glsl
Spirv Vm
Virtual machine for executing SPIR-V
Stars: ✭ 173 (-2.26%)
Mutual labels:  glsl
Soicbite
A compact PCB footprint which allows SOIC test clips to be used as a space-efficient programming and debugging connector
Stars: ✭ 161 (-9.04%)
Mutual labels:  glsl
Processing Shader Examples
A collection of GLSL shaders and how to use them in Processing sketches
Stars: ✭ 167 (-5.65%)
Mutual labels:  glsl
Reshade
A generic post-processing injector for games and video software.
Stars: ✭ 2,285 (+1190.96%)
Mutual labels:  glsl
Glsl Godrays
This module implements a volumetric light scattering effect(godrays)
Stars: ✭ 155 (-12.43%)
Mutual labels:  glsl
Shadertoy lab
✏️ Test some shadertoy examples in Unity.
Stars: ✭ 164 (-7.34%)
Mutual labels:  glsl
Glsl Sdf Primitives
A bunch of distance field primitives for ray marching
Stars: ✭ 152 (-14.12%)
Mutual labels:  glsl
Shader Printf
Simple printf functionality for GLSL.
Stars: ✭ 170 (-3.95%)
Mutual labels:  glsl
Wombat
An efficient texture-free GLSL procedural noise library
Stars: ✭ 149 (-15.82%)
Mutual labels:  glsl
Starwars.android
This component implements transition animation to crumble view into tiny pieces.
Stars: ✭ 1,942 (+997.18%)
Mutual labels:  glsl
React Regl
React Fiber Reconciler Renderer for Regl WebGL
Stars: ✭ 171 (-3.39%)
Mutual labels:  glsl
Gpu.js
GPU Accelerated JavaScript
Stars: ✭ 13,427 (+7485.88%)
Mutual labels:  glsl
Fragment
Live Code Graphics via GLSL Fragment Shaders
Stars: ✭ 166 (-6.21%)
Mutual labels:  glsl

Filters4Processing

A growing collection of pixel shaders ported to Processing to be used with the filter() function. Most of these shaders come from the excellent Shadertoy by Iñigo Quilez.

Note: This repository focuses on filters. If you want to port any other type of shader from Shadertoy to Processing, check out this other repository Shadertoy2Processing

Filters

Gaussian blur

screenshot

Barrel Blur Chroma

screenshot

Barrel & Pincushion

screenshot

Bicubic Filter

screenshot

Bilateral Filter (denoise)

screenshot

Contrast, Saturation, Brightness

screenshot

Dithering

screenshot

Edge filter

screenshot

Metaballs

screenshot

Droste

screenshot

Usage

This is a minimal example showing how to import a shader file in Processing and use it as a filter.

Note: Some shaders require additional uniforms. For details, refer to the example sketches included.


// Create an image object
PImage  myImage;

// Create a shader object
PShader myFilter;

void setup() {

  size( 512, 512, P2D );

  // Import the image file
  myImage  = loadImage( "texture.jpg" );

  // Import the shader file
  myFilter = loadShader( "shader.glsl" );

  // Pass the size of the window to the shader
  myFilter.set("sketchSize", float(width), float(height));

}

void draw() {

  // Draw the image on the scene
  image( myImage, 0, 0 );

  // Applie the shader to the scene
  filter( myFilter );

}

Notes about porting filters from Shadertoy

Shadertoy and Processing both have their own quirks when it comes to shader programming. We need to make some changes in order to make Shadertoy code work with Processing.

Replace: void mainImage( out vec4 fragColor, in vec2 fragCoord ) -> void main( void )

Replace all:

  • iChannel0 -> texture
  • fragCoord -> gl_FragCoord
  • fragColor -> gl_FragColor

There is more to it than this but these tips should cover most basic filters.

Now go dig for some shaders and help us extend the library of filters available for Processing!

Acknowledgments

Thanks to all the Shadertoy contributors for their hard work. This collection wouldn't exist without them. Thanks to Andres Colubri for his work on the Processing Shader API.

License

All shaders from Shadertoy belong to there respective authors. Unless otherwise specified in the shader file, they are licensed under Creative Commons (CC BY-NC-SA 3.0)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].