BillboardCollectionVS.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "#ifdef INSTANCED\n\
  3. in vec2 direction;\n\
  4. #endif\n\
  5. in vec4 positionHighAndScale;\n\
  6. in vec4 positionLowAndRotation;\n\
  7. in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\n\
  8. in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\n\
  9. in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free\n\
  10. in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\n\
  11. in vec4 scaleByDistance; // near, nearScale, far, farScale\n\
  12. in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\n\
  13. in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\n\
  14. in vec2 sdf; // sdf outline color (rgb) and width (w)\n\
  15. #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n\
  16. in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n\
  17. #endif\n\
  18. #ifdef VECTOR_TILE\n\
  19. in float a_batchId;\n\
  20. #endif\n\
  21. \n\
  22. out vec2 v_textureCoordinates;\n\
  23. #ifdef FRAGMENT_DEPTH_CHECK\n\
  24. out vec4 v_textureCoordinateBounds;\n\
  25. out vec4 v_originTextureCoordinateAndTranslate;\n\
  26. out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\n\
  27. out mat2 v_rotationMatrix;\n\
  28. #endif\n\
  29. \n\
  30. out vec4 v_pickColor;\n\
  31. out vec4 v_color;\n\
  32. #ifdef SDF\n\
  33. out vec4 v_outlineColor;\n\
  34. out float v_outlineWidth;\n\
  35. #endif\n\
  36. \n\
  37. const float UPPER_BOUND = 32768.0;\n\
  38. \n\
  39. const float SHIFT_LEFT16 = 65536.0;\n\
  40. const float SHIFT_LEFT12 = 4096.0;\n\
  41. const float SHIFT_LEFT8 = 256.0;\n\
  42. const float SHIFT_LEFT7 = 128.0;\n\
  43. const float SHIFT_LEFT5 = 32.0;\n\
  44. const float SHIFT_LEFT3 = 8.0;\n\
  45. const float SHIFT_LEFT2 = 4.0;\n\
  46. const float SHIFT_LEFT1 = 2.0;\n\
  47. \n\
  48. const float SHIFT_RIGHT12 = 1.0 / 4096.0;\n\
  49. const float SHIFT_RIGHT8 = 1.0 / 256.0;\n\
  50. const float SHIFT_RIGHT7 = 1.0 / 128.0;\n\
  51. const float SHIFT_RIGHT5 = 1.0 / 32.0;\n\
  52. const float SHIFT_RIGHT3 = 1.0 / 8.0;\n\
  53. const float SHIFT_RIGHT2 = 1.0 / 4.0;\n\
  54. const float SHIFT_RIGHT1 = 1.0 / 2.0;\n\
  55. \n\
  56. vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n\
  57. {\n\
  58. // Note the halfSize cannot be computed in JavaScript because it is sent via\n\
  59. // compressed vertex attributes that coerce it to an integer.\n\
  60. vec2 halfSize = imageSize * scale * 0.5;\n\
  61. halfSize *= ((direction * 2.0) - 1.0);\n\
  62. \n\
  63. vec2 originTranslate = origin * abs(halfSize);\n\
  64. \n\
  65. #if defined(ROTATION) || defined(ALIGNED_AXIS)\n\
  66. if (validAlignedAxis || rotation != 0.0)\n\
  67. {\n\
  68. float angle = rotation;\n\
  69. if (validAlignedAxis)\n\
  70. {\n\
  71. vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);\n\
  72. angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n\
  73. (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n\
  74. }\n\
  75. \n\
  76. float cosTheta = cos(angle);\n\
  77. float sinTheta = sin(angle);\n\
  78. rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n\
  79. halfSize = rotationMatrix * halfSize;\n\
  80. }\n\
  81. else\n\
  82. {\n\
  83. rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n\
  84. }\n\
  85. #endif\n\
  86. \n\
  87. mpp = czm_metersPerPixel(positionEC);\n\
  88. positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n\
  89. positionEC.xy += (translate + pixelOffset) * mpp;\n\
  90. \n\
  91. return positionEC;\n\
  92. }\n\
  93. \n\
  94. #ifdef VERTEX_DEPTH_CHECK\n\
  95. float getGlobeDepth(vec4 positionEC)\n\
  96. {\n\
  97. vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n\
  98. \n\
  99. float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n\
  100. \n\
  101. if (globeDepth == 0.0)\n\
  102. {\n\
  103. return 0.0; // not on the globe\n\
  104. }\n\
  105. \n\
  106. vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n\
  107. return eyeCoordinate.z / eyeCoordinate.w;\n\
  108. }\n\
  109. #endif\n\
  110. void main()\n\
  111. {\n\
  112. // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition\n\
  113. \n\
  114. // unpack attributes\n\
  115. vec3 positionHigh = positionHighAndScale.xyz;\n\
  116. vec3 positionLow = positionLowAndRotation.xyz;\n\
  117. float scale = positionHighAndScale.w;\n\
  118. \n\
  119. #if defined(ROTATION) || defined(ALIGNED_AXIS)\n\
  120. float rotation = positionLowAndRotation.w;\n\
  121. #else\n\
  122. float rotation = 0.0;\n\
  123. #endif\n\
  124. \n\
  125. float compressed = compressedAttribute0.x;\n\
  126. \n\
  127. vec2 pixelOffset;\n\
  128. pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n\
  129. compressed -= pixelOffset.x * SHIFT_LEFT7;\n\
  130. pixelOffset.x -= UPPER_BOUND;\n\
  131. \n\
  132. vec2 origin;\n\
  133. origin.x = floor(compressed * SHIFT_RIGHT5);\n\
  134. compressed -= origin.x * SHIFT_LEFT5;\n\
  135. \n\
  136. origin.y = floor(compressed * SHIFT_RIGHT3);\n\
  137. compressed -= origin.y * SHIFT_LEFT3;\n\
  138. \n\
  139. #ifdef FRAGMENT_DEPTH_CHECK\n\
  140. vec2 depthOrigin = origin.xy;\n\
  141. #endif\n\
  142. origin -= vec2(1.0);\n\
  143. \n\
  144. float show = floor(compressed * SHIFT_RIGHT2);\n\
  145. compressed -= show * SHIFT_LEFT2;\n\
  146. \n\
  147. #ifdef INSTANCED\n\
  148. vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n\
  149. vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n\
  150. vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n\
  151. #else\n\
  152. vec2 direction;\n\
  153. direction.x = floor(compressed * SHIFT_RIGHT1);\n\
  154. direction.y = compressed - direction.x * SHIFT_LEFT1;\n\
  155. \n\
  156. vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n\
  157. #endif\n\
  158. \n\
  159. float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n\
  160. pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n\
  161. \n\
  162. vec2 translate;\n\
  163. translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n\
  164. \n\
  165. temp = compressedAttribute0.z * SHIFT_RIGHT8;\n\
  166. translate.x = floor(temp) - UPPER_BOUND;\n\
  167. \n\
  168. translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n\
  169. translate.y -= UPPER_BOUND;\n\
  170. \n\
  171. temp = compressedAttribute1.x * SHIFT_RIGHT8;\n\
  172. float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\n\
  173. \n\
  174. vec2 imageSize = vec2(floor(temp), temp2);\n\
  175. \n\
  176. #ifdef FRAGMENT_DEPTH_CHECK\n\
  177. float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\n\
  178. float applyTranslate = 0.0;\n\
  179. if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false\n\
  180. {\n\
  181. applyTranslate = 1.0;\n\
  182. labelHorizontalOrigin -= 2.0;\n\
  183. depthOrigin.x = labelHorizontalOrigin + 1.0;\n\
  184. }\n\
  185. \n\
  186. depthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n\
  187. #endif\n\
  188. \n\
  189. #ifdef EYE_DISTANCE_TRANSLUCENCY\n\
  190. vec4 translucencyByDistance;\n\
  191. translucencyByDistance.x = compressedAttribute1.z;\n\
  192. translucencyByDistance.z = compressedAttribute1.w;\n\
  193. \n\
  194. translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\
  195. \n\
  196. temp = compressedAttribute1.y * SHIFT_RIGHT8;\n\
  197. translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\
  198. #endif\n\
  199. \n\
  200. #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n\
  201. temp = compressedAttribute3.w;\n\
  202. temp = temp * SHIFT_RIGHT12;\n\
  203. \n\
  204. vec2 dimensions;\n\
  205. dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n\
  206. dimensions.x = floor(temp);\n\
  207. #endif\n\
  208. \n\
  209. #ifdef ALIGNED_AXIS\n\
  210. vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n\
  211. temp = compressedAttribute2.z * SHIFT_RIGHT5;\n\
  212. bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n\
  213. #else\n\
  214. vec3 alignedAxis = vec3(0.0);\n\
  215. bool validAlignedAxis = false;\n\
  216. #endif\n\
  217. \n\
  218. vec4 pickColor;\n\
  219. vec4 color;\n\
  220. \n\
  221. temp = compressedAttribute2.y;\n\
  222. temp = temp * SHIFT_RIGHT8;\n\
  223. pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  224. temp = floor(temp) * SHIFT_RIGHT8;\n\
  225. pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  226. pickColor.r = floor(temp);\n\
  227. \n\
  228. temp = compressedAttribute2.x;\n\
  229. temp = temp * SHIFT_RIGHT8;\n\
  230. color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  231. temp = floor(temp) * SHIFT_RIGHT8;\n\
  232. color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  233. color.r = floor(temp);\n\
  234. \n\
  235. temp = compressedAttribute2.z * SHIFT_RIGHT8;\n\
  236. bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n\
  237. temp = floor(temp) * SHIFT_RIGHT8;\n\
  238. \n\
  239. pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  240. pickColor /= 255.0;\n\
  241. \n\
  242. color.a = floor(temp);\n\
  243. color /= 255.0;\n\
  244. \n\
  245. ///////////////////////////////////////////////////////////////////////////\n\
  246. \n\
  247. vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n\
  248. vec4 positionEC = czm_modelViewRelativeToEye * p;\n\
  249. \n\
  250. #if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\n\
  251. float eyeDepth = positionEC.z;\n\
  252. #endif\n\
  253. \n\
  254. positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n\
  255. positionEC.xyz *= show;\n\
  256. \n\
  257. ///////////////////////////////////////////////////////////////////////////\n\
  258. \n\
  259. #if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n\
  260. float lengthSq;\n\
  261. if (czm_sceneMode == czm_sceneMode2D)\n\
  262. {\n\
  263. // 2D camera distance is a special case\n\
  264. // treat all billboards as flattened to the z=0.0 plane\n\
  265. lengthSq = czm_eyeHeight2D.y;\n\
  266. }\n\
  267. else\n\
  268. {\n\
  269. lengthSq = dot(positionEC.xyz, positionEC.xyz);\n\
  270. }\n\
  271. #endif\n\
  272. \n\
  273. #ifdef EYE_DISTANCE_SCALING\n\
  274. float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\n\
  275. scale *= distanceScale;\n\
  276. translate *= distanceScale;\n\
  277. // push vertex behind near plane for clipping\n\
  278. if (scale == 0.0)\n\
  279. {\n\
  280. positionEC.xyz = vec3(0.0);\n\
  281. }\n\
  282. #endif\n\
  283. \n\
  284. float translucency = 1.0;\n\
  285. #ifdef EYE_DISTANCE_TRANSLUCENCY\n\
  286. translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n\
  287. // push vertex behind near plane for clipping\n\
  288. if (translucency == 0.0)\n\
  289. {\n\
  290. positionEC.xyz = vec3(0.0);\n\
  291. }\n\
  292. #endif\n\
  293. \n\
  294. #ifdef EYE_DISTANCE_PIXEL_OFFSET\n\
  295. float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n\
  296. pixelOffset *= pixelOffsetScale;\n\
  297. #endif\n\
  298. \n\
  299. #ifdef DISTANCE_DISPLAY_CONDITION\n\
  300. float nearSq = compressedAttribute3.x;\n\
  301. float farSq = compressedAttribute3.y;\n\
  302. if (lengthSq < nearSq || lengthSq > farSq)\n\
  303. {\n\
  304. positionEC.xyz = vec3(0.0);\n\
  305. }\n\
  306. #endif\n\
  307. \n\
  308. mat2 rotationMatrix;\n\
  309. float mpp;\n\
  310. \n\
  311. #ifdef DISABLE_DEPTH_DISTANCE\n\
  312. float disableDepthTestDistance = compressedAttribute3.z;\n\
  313. #endif\n\
  314. \n\
  315. #ifdef VERTEX_DEPTH_CHECK\n\
  316. if (lengthSq < disableDepthTestDistance) {\n\
  317. float depthsilon = 10.0;\n\
  318. \n\
  319. vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\n\
  320. vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n\
  321. float globeDepth1 = getGlobeDepth(pEC1);\n\
  322. \n\
  323. if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n\
  324. {\n\
  325. vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n\
  326. float globeDepth2 = getGlobeDepth(pEC2);\n\
  327. \n\
  328. if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n\
  329. {\n\
  330. vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n\
  331. float globeDepth3 = getGlobeDepth(pEC3);\n\
  332. if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n\
  333. {\n\
  334. positionEC.xyz = vec3(0.0);\n\
  335. }\n\
  336. }\n\
  337. }\n\
  338. }\n\
  339. #endif\n\
  340. \n\
  341. positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n\
  342. gl_Position = czm_projection * positionEC;\n\
  343. v_textureCoordinates = textureCoordinates;\n\
  344. \n\
  345. #ifdef LOG_DEPTH\n\
  346. czm_vertexLogDepth();\n\
  347. #endif\n\
  348. \n\
  349. #ifdef DISABLE_DEPTH_DISTANCE\n\
  350. if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n\
  351. {\n\
  352. disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n\
  353. }\n\
  354. \n\
  355. if (disableDepthTestDistance != 0.0)\n\
  356. {\n\
  357. // Don't try to \"multiply both sides\" by w. Greater/less-than comparisons won't work for negative values of w.\n\
  358. float zclip = gl_Position.z / gl_Position.w;\n\
  359. bool clipped = (zclip < -1.0 || zclip > 1.0);\n\
  360. if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n\
  361. {\n\
  362. // Position z on the near plane.\n\
  363. gl_Position.z = -gl_Position.w;\n\
  364. #ifdef LOG_DEPTH\n\
  365. v_depthFromNearPlusOne = 1.0;\n\
  366. #endif\n\
  367. }\n\
  368. }\n\
  369. #endif\n\
  370. \n\
  371. #ifdef FRAGMENT_DEPTH_CHECK\n\
  372. if (sizeInMeters) {\n\
  373. translate /= mpp;\n\
  374. dimensions /= mpp;\n\
  375. imageSize /= mpp;\n\
  376. }\n\
  377. \n\
  378. #if defined(ROTATION) || defined(ALIGNED_AXIS)\n\
  379. v_rotationMatrix = rotationMatrix;\n\
  380. #else\n\
  381. v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n\
  382. #endif\n\
  383. \n\
  384. float enableDepthCheck = 0.0;\n\
  385. if (lengthSq < disableDepthTestDistance)\n\
  386. {\n\
  387. enableDepthCheck = 1.0;\n\
  388. }\n\
  389. \n\
  390. float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\n\
  391. float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\n\
  392. \n\
  393. float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\n\
  394. float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\n\
  395. \n\
  396. v_compressed.x = eyeDepth;\n\
  397. v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\n\
  398. v_compressed.z = dw * SHIFT_LEFT12 + dh;\n\
  399. v_compressed.w = iw * SHIFT_LEFT12 + ih;\n\
  400. v_originTextureCoordinateAndTranslate.xy = depthOrigin;\n\
  401. v_originTextureCoordinateAndTranslate.zw = translate;\n\
  402. v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n\
  403. \n\
  404. #endif\n\
  405. \n\
  406. #ifdef SDF\n\
  407. vec4 outlineColor;\n\
  408. float outlineWidth;\n\
  409. \n\
  410. temp = sdf.x;\n\
  411. temp = temp * SHIFT_RIGHT8;\n\
  412. outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  413. temp = floor(temp) * SHIFT_RIGHT8;\n\
  414. outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  415. outlineColor.r = floor(temp);\n\
  416. \n\
  417. temp = sdf.y;\n\
  418. temp = temp * SHIFT_RIGHT8;\n\
  419. float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  420. temp = floor(temp) * SHIFT_RIGHT8;\n\
  421. outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\n\
  422. outlineColor.a = floor(temp);\n\
  423. outlineColor /= 255.0;\n\
  424. \n\
  425. v_outlineWidth = outlineWidth / 255.0;\n\
  426. v_outlineColor = outlineColor;\n\
  427. v_outlineColor.a *= translucency;\n\
  428. #endif\n\
  429. \n\
  430. v_pickColor = pickColor;\n\
  431. \n\
  432. v_color = color;\n\
  433. v_color.a *= translucency;\n\
  434. \n\
  435. }\n\
  436. ";