2015-12-23 11:39:45 +00:00
|
|
|
#version 120
|
|
|
|
|
|
|
|
varying vec3 vertex;
|
|
|
|
varying vec3 normal;
|
|
|
|
varying vec3 relVec;
|
|
|
|
|
2017-04-05 13:50:31 +00:00
|
|
|
uniform float osg_SimulationTime;
|
|
|
|
uniform float arc_id;
|
|
|
|
|
|
|
|
|
2015-12-23 11:39:45 +00:00
|
|
|
void main()
|
|
|
|
{
|
|
|
|
|
|
|
|
normal = gl_Normal;
|
|
|
|
vertex = gl_Vertex.xyz;
|
|
|
|
vec3 ep = (gl_ModelViewMatrixInverse * vec4 (0.0, 0.0, 0.0, 1.0)).xyz;
|
|
|
|
relVec = vertex - ep;
|
2017-04-05 13:50:31 +00:00
|
|
|
|
|
|
|
vec4 vert_out = gl_Vertex;
|
|
|
|
|
|
|
|
float ang = dot(vert_out.xy, vec2 (0.0, 1.0));
|
|
|
|
|
|
|
|
vert_out.x *= (1.0 + 0.05 * sin(ang + 0.1 * osg_SimulationTime + arc_id));
|
|
|
|
vert_out.y *= (1.0 + 0.05 * sin(ang + 0.12 * osg_SimulationTime + arc_id));
|
|
|
|
|
|
|
|
|
|
|
|
gl_Position = gl_ModelViewProjectionMatrix * vert_out;
|
2015-12-23 11:39:45 +00:00
|
|
|
}
|