OpenGL:GLSL Shaders Repository

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

This page contains a list of free shaders for GLSL. You can add your in the relative section.

Contents


Vertex Shaders

Basic

Blue Waving

This shader modify the vertex's Y coord and multiply for the sine of the vertex's X coord. It also color the vertex of blue.

void main()
{
	vec4 v = vec4(gl_Vertex);
	v.y = sin(0.5 * v.x);
 
	gl_Position = gl_ModelViewProjectionMatrix * v;
	gl_FrontColor.rgb = vec3(0.0, 0.0, 1.0);
}

Advanced

Fragment Shaders

Basic

Advanced