# ElevationRamp inside the polygon

**URL:** <https://community.cesium.com/t/elevationramp-inside-the-polygon/11506>\
**Category:** CesiumJS\
**Created:** [November 10, 2020, 2:59pm UTC](https://community.cesium.com/t/elevationramp-inside-the-polygon/11506 "2020-11-10T14:59:56Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dzung](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dzung/32/2996_2.png) [@dzung](https://community.cesium.com/u/dzung)\
**Post date:** [November 20, 2020, 8:37pm UTC](https://community.cesium.com/t/elevationramp-inside-the-polygon/11506/4 "2020-11-20T20:37:53Z")

</div>

> [@Olga\_Aptekar](#):
>
> - if I need a polygon, but it do not clamped to the ground by default, is it possible to make it clamped?

Yes it is possible. You can use [PolygonGraphics](https://cesium.com/docs/cesiumjs-ref-doc/global.html#HeightReference) with heightReference set to CLAMP\_TO\_GROUND. You can also use [GroundPrimitive](https://cesium.com/docs/cesiumjs-ref-doc/GroundPrimitive.html?classFilter=ground), which automatically drape over terrain.

> [@Olga\_Aptekar](#):
>
> Unfortunately, there is no link in your answer. But if I found correctly, you means [this one](https://sandcastle.cesium.com/?src=Clamp%20to%20Terrain.html), right?

My apologies, that is the correct link.

> [@Olga\_Aptekar](#):
>
> Is it possible to use custom shaders at the entity?

It is possible as noted in [this discussion](https://community.cesium.com/t/custom-material-on-a-rectangle-entity/3391/4).

> [@Olga\_Aptekar](#):
>
> 1. Do you have any examples not for this specific case, but maybe for the case of custom shaders for the entity?

I have previously made an example for primitives [here](https://sandcastle.cesium.com/#c=pVXRbtMwFP0Vqy9tUee0G2NodBOlG3tgsAkQPBCE3OSmsXDsyHZSdaj/zrWTdGnWTZrmh6b2vef45N5jp2SalBxWoMkZkbAiczC8yOgPvzboR346V9IyLkH3h+9CWSLGRCABIRWW+imGQhkEZK6BWSCGZbkAkiuxFoglueYZt7wEWlE0AYM0Hk+3GYayOB605NzWuXMlBESWKzkYNlK2G5zdU3r8v1ASHLky3CEMOe3S3fIc3JMucXuNoudMW0xhcqajBv8Ixzb1iCZaZRew1ABmpjVbD34dTCZjOh6R14f4e0/z3HHw9tixHL15Gctk7MUcHr+M5uTEsUzwlX4PK5rNsOZb8dimWBvcIZSbYeOEmTF8KQnzzkrYQvOIZFhmzZkgCwEyJiohTGu1IgwnMTMpNs+hm1bSbf6OPz/Xq02TavJT0mpagzS7y26gtu8pVDs3VGhQVfIY/WgxFCmhtBelSrSGEMSkLHfebfOowjqRW4oHG7lh1zlgpN+47qYC9ff0opA8UToz+4ncqHTdu9BN6dXXy8svj7S2lugTO7AP17P5p6dhP11jT8mh62s3ZbO7tOkwuWY+rzAXiHiqKo8UxW10DXLphB4/U2j7P5riI5fY6vXIWyDsMZGnLOxh0f39Z9DJUYqX24isUtBAVoDaYkWiu+xPzE3EdEzcZeDh7fdv2SZSWa4kSLunyTFPksL4mnScRetQtzxe4b78KvCKDCZ0TA6ax44mn4LXaL9Vjvpc+0PcG/Wmxq4FnFer7zkq15YUWgwoDSzg/Y5cJlgU0V+wNDLGnfxp0ICmMS8Jj8/CXucz4koqmDEYSQohvvE7CHvn0wDzd2BCsZjL5Q2eQMHWLiWdnF9Xi5TSaYDThyirlFgw3WL8Dw). I don’t recall seeing an example for entities.

Thank you for sharing your use case. We look forward to seeing the results and assisting you further with the project.

---

_[View the full topic](https://community.cesium.com/t/elevationramp-inside-the-polygon/11506)._
