mirror of https://gitee.com/antv-l7/antv-l7
24 lines
732 B
GLSL
24 lines
732 B
GLSL
precision highp float;
|
|
attribute vec4 a_color;
|
|
uniform float currentTime;
|
|
uniform float u_time;
|
|
uniform float u_opacity;
|
|
varying float vTime;
|
|
varying vec4 v_color;
|
|
uniform float u_activeId;
|
|
uniform vec4 u_activeColor;
|
|
void main() {
|
|
mat4 matModelViewProjection = projectionMatrix * modelViewMatrix;
|
|
v_color = a_color;
|
|
v_color.a *= u_opacity;
|
|
if(pickingId == u_activeId) {
|
|
v_color = u_activeColor;
|
|
}
|
|
#ifdef ANIMATE
|
|
vTime = 1.0- (mod(u_time*50.,3600.)- position.z) / 100.;
|
|
// vTime = 1.0- (28800. + mod(u_time* 10.,28800.)- position.z / 1000.) / 100.;
|
|
#endif
|
|
gl_Position = matModelViewProjection * vec4(position.xy, 0., 1.0);
|
|
gl_Position.z += 2. * gl_Position.w;
|
|
worldId = id_toPickColor(pickingId);
|
|
} |