- attribute float weight;
- attribute float time;
- void main()
- {
- // use weight and time attributes to let the upper part of the billboard wave in the wind
- vec4 vertex = gl_Vertex;
- float tSin = sin(time);
- vertex.x = vertex.x + (0.2 * tSin) * weight;
- gl_Position = gl_ModelViewProjectionMatrix * vertex;
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_FrontColor = gl_Color;
- }