Custom appearance. Need help

Hi!
I’m trying to solve the issue: “Colorize polygon like ElevationRamp”.

I’m trying to use [ElevationRampMaterial](FROM: https://github.com/CesiumGS/cesium/blob/master/Source/Shaders/Materials/ElevationRampMaterial.glsl) as a fragment shader for custom appearance,

  1. test 1
    but it doesn’t work, because I cannot use czm_material in the fragment shader.
    So, what can I use instead of it?

  2. I’ve tried to simplify this test: test 2
    But in this case I get an error, related to the custom material.
    So, what is wrong with my fabric and material?

I’ll be appreciate for any help!