You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
768 B
GLSL
29 lines
768 B
GLSL
attribute vec3 position3DHigh;
|
|
attribute vec3 position3DLow;
|
|
attribute vec3 prevPosition3DHigh;
|
|
attribute vec3 prevPosition3DLow;
|
|
attribute vec3 nextPosition3DHigh;
|
|
attribute vec3 nextPosition3DLow;
|
|
attribute vec2 expandAndWidth;
|
|
attribute vec4 color;
|
|
attribute float batchId;
|
|
|
|
varying vec4 v_color;
|
|
|
|
void main()
|
|
{
|
|
float expandDir = expandAndWidth.x;
|
|
float width = abs(expandAndWidth.y) + 0.5;
|
|
bool usePrev = expandAndWidth.y < 0.0;
|
|
|
|
vec4 p = czm_computePosition();
|
|
vec4 prev = czm_computePrevPosition();
|
|
vec4 next = czm_computeNextPosition();
|
|
|
|
float angle;
|
|
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
|
|
gl_Position = czm_viewportOrthographic * positionWC;
|
|
|
|
v_color = color;
|
|
}
|