Shaders database

I am testing the new features of Codea, shaders,…what can I say, it is more than fast, epic!

I am thinking about create a place to share shaders in the forum, this must be the right place.

So ,hands up, I took the “Shaders” example from Codea 1.5(4), and add after iparameter(“Texture”…) in function setup():

parameter("R", 0,1,1)
parameter("G", 0,1,1)
parameter("B", 0,1,1)

Then, in function draw() , add after --configure out custom uniforms for the ripple shader:

m.shader.r = R
m.shader.g = G
m.shader.b = B

You just have to define the vars in the fragment tab inside the amazing shader editor, I have made a copy of ripple and named it colorize ripple, add in fragment the definitions:

uniform highp float r;
uniform highp float g;
uniform highp float b;

we got the bridge done, just use it with the replacement of gl_FragmentColor to colorize with our parameters the texture obtained by the ripple main function (Fragment):

gl_FragColor = vec4(vec3(r,g,b)*vColor.rgb*col.rgb, col.a);

Video
http://www.youtube.com/watch?v=L6f1x2naQP0

Are you real- time changing the input from the camera with this? Oh, and where can the rest of us get 1.5? :slight_smile:

This is realtime , awesome…

Ask @Simeon to join the beta tester team

Thought I did already :slight_smile:

Ok, what do you think, it could be great to have a list with shaders here, huh? :slight_smile:

Here it is a web simulator of GLSL:

http://glsl.heroku.com/e#2328.0

Very nice web source! How can we use it in practice? I don’t see any ‘vertex shader’ nor ‘fragment shader’ sections… So what are the rules to import it to Codea Shaders lab?