Changing the PolyLineGlowMaterial or combining materials?

1. A concise explanation of the problem you’re experiencing.

Ideally I need the behaviors of a PolylineGlowMaterialProperty that has a taper and some amount of “glow” but I need the “glow” to not be “white”. I don’t see a way to set the “base” color of the line, only the “glow” - so ultimately it looks like a white line with a blue glow what I’d like is a blue line with a dark blue glow, with the ability to taper.

Also if possible, it would be useful if there was an arrowhead option as well.

Is there a way to achieve what I want.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var glowingLine = viewer.entities.add({

name : ‘Glowing blue line on the surface’,

polyline : {

positions : Cesium.Cartesian3.fromDegreesArray([-75, 37,

-125, 37]),

width : 10,

material : new Cesium.PolylineGlowMaterialProperty({

glowPower : 0.2,

taperPower : 0.5,

color : Cesium.Color.BLUE




var orangeOutlined = viewer.entities.add({

name : ‘Blue line with Navy outline at height and following the surface’,

polyline : {

positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 39, 250000,

-125, 39, 250000]),

width : 10,

material : new Cesium.PolylineOutlineMaterialProperty({

color : Cesium.Color.BLUE,

outlineWidth : 2,

outlineColor : Cesium.Color.NAVYBLUE




var purpleArrow = viewer.entities.add({

name : ‘Blue straight arrow at height’,

polyline : {

positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 43, 500000,

-125, 43, 500000]),

width : 10,

arcType : Cesium.ArcType.NONE,

material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.BLUE)




3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I need to render a polyline with an arrowhead that shows tapered decay.

4. The Cesium version you’re using, your operating system and browser.

1.60 and Chrome Version 76.0.3809.100 macOS Mojave (however Windows Chrome is also a target)

It looks like the shader for the glow material currently makes it “glow” by making it get closer to white:

You should be able to tweak this to see what kind of effect you want to create. A pull request to extend this material would be welcome!