This project is read-only.

This shader is almost the same as wave shader, except that this one has animation


Vertex shader

// Waving shader

// Created by Zhiyong Yang,


// This is a wave shader, with time triggered animation.

uniform float time;

void main()


vec4 position= gl_Vertex;


gl_Position = gl_ModelViewProjectionMatrix * position;

gl_FrontColor = gl_Color;

gl_TexCoord[0] = gl_MultiTexCoord0;


Fragment shader

// simple fragment shader

// 'time' contains seconds since the program was linked.

uniform float time;

uniform sampler2D tex;

void main()


   gl_FragColor = gl_Color*texture2D(tex,gl_TexCoord[0].xy);




Last edited Mar 17, 2013 at 2:56 AM by younthu, version 5


No comments yet.