Closed nvkelso closed 7 years ago
On JS we encode the speed to a red channel (over 0~1, everything above gets clamp)
(feature.speed || feature.speeds[0].average_speed)/100
On the shader is a linear mapping to the texture (very cheap)
color = texture2D(u_palette, vec2(clamp(v_color.r,0.,1.),.5));
Partial work towards #9 with preset list.