how to make sure a CorridorGraphics color is really constant

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

I'm drawing shapes on the ground using CorridorGraphics. I'm setting a color constant for the material, e.g. like this:

var foo = viewer.entities.add({
    id: 'XXX',
    name: 'name of XXX',
    corridor: {
        positions: Cesium.Cartesian3.fromDegreesArray([
            lon1, lat1,
            lon2, lat2
        ]),
        width: ww,
        cornerType: Cesium.CornerType.MITERED,
        material: Cesium.Color.GREEN
    }
});

when I render this, I see that the color rendered is not constant, but the RGB values vary a little bit, e.g. between (27, 138, 44), (25, 142, 35), (24, 144, 33), (25, 142, 35)

I'd like to have the corridor rendered so that the color rendered is actually constant, e.g. gives the same RGB value for each pixel in the corridor from all viewpoints

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

see above

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

I'd like to record an animation of a scene with the corridors on it, with the corridors covering their area with same colored pixels

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

1.50, Chrome, Ubuntu 18.04

I think in Cesium’s terms, “constant” usually refers to “constant over time”. I think what you’re thinking of is unlit shading, where the color isn’t affected by light sources/the camera angle etc…

I think you’ll need create a custom Appearance to get this effect (see this tutorial https://cesiumjs.org/tutorials/Geometry-and-Appearances/ ).

Here’s a Sandcastle example I put together. If you tilt the camera, you’ll notice the corridor on the right changes color, while the corridor on the left does not.

Let me know if this is what you need!

Omar,