createElevationBandMaterial

Creates a Material that combines multiple layers of color/gradient bands and maps them to terrain heights.

The shader does a binary search over all the heights to find out which colors are above and below a given height, and interpolates between them for the final color. This material supports hundreds of entries relatively cheaply.

scene.globe.material = createElevationBandMaterial({
scene : scene,
layers : [{
entries : [{
height : 4200.0,
color : new Color(0.0, 0.0, 0.0, 1.0)
}, {
height : 8848.0,
color : new Color(1.0, 1.0, 1.0, 1.0)
}],
extendDownwards : true,
extendUpwards : true,
}, {
entries : [{
height : 7000.0,
color : new Color(1.0, 0.0, 0.0, 0.5)
}, {
height : 7100.0,
color : new Color(1.0, 0.0, 0.0, 0.5)
}]
}]
});

Return

A new Material instance.

See also