DSDSServer2024/build/build.20240805/static/js/Cesium-1.53/Source/Shaders/Appearances/PolylineMaterialAppearanceV...

35 lines
915 B
GLSL

attribute vec3 position3DHigh;
attribute vec3 position3DLow;
attribute vec3 prevPosition3DHigh;
attribute vec3 prevPosition3DLow;
attribute vec3 nextPosition3DHigh;
attribute vec3 nextPosition3DLow;
attribute vec2 expandAndWidth;
attribute vec2 st;
attribute float batchId;
varying float v_width;
varying vec2 v_st;
varying float v_polylineAngle;
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();
v_width = width;
v_st = st;
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, v_polylineAngle);
gl_Position = czm_viewportOrthographic * positionWC;
#ifdef LOG_DEPTH
czm_vertexLogDepth(czm_modelViewProjectionRelativeToEye * p);
#endif
}