# Custom Renderer -  Shader Possibilities

**URL:** <https://community.cesium.com/t/custom-renderer-shader-possibilities/5235>\
**Category:** CesiumJS\
**Created:** [March 2, 2017, 9:27am UTC](https://community.cesium.com/t/custom-renderer-shader-possibilities/5235 "2017-03-02T09:27:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruediger\_Brand](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ruediger_brand/32/4004_2.png) [@Ruediger\_Brand](https://community.cesium.com/u/Ruediger_Brand)\
**Post date:** [March 2, 2017, 9:27am UTC](https://community.cesium.com/t/custom-renderer-shader-possibilities/5235/1 "2017-03-02T09:27:47Z")

</div>

Hi,

i have read post from Hannah, where she gave a tip to write a custom shader.  
Does there exist any documentation for this ?

In my project we have a partner with huge know-how in OpenGL and computation on GPU. The partner uses its own datastructures for very fast access to the data and rendering. Is it possible to transfer/transfer this to Cesium? What is the best starting point ? For Rendering the partner uses ray-tracing mechanisms - is there a chance to use this in connection with cesium ?

Best regards

Rüdiger

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [March 2, 2017, 2:08pm UTC](https://community.cesium.com/t/custom-renderer-shader-possibilities/5235/2 "2017-03-02T14:08:17Z")

</div>

Hello Rüdiger,

You can create a custom material by writing a GLSL shader and adding it to our Material class. Here is an example for a checkerboard material:

> <https://github.com/CesiumGS/cesium/blob/master/Source/Shaders/Materials/CheckerboardMaterial.glsl>

> <https://github.com/CesiumGS/cesium/blob/master/Source/Scene/Material.js#L1271-L1286>

I don’t know about using ray-tracing in Cesium. Maybe someone else will have pointers there.

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [March 3, 2017, 12:31am UTC](https://community.cesium.com/t/custom-renderer-shader-possibilities/5235/3 "2017-03-03T00:31:05Z")

</div>

Hi Rüdiger, it’s possible to do raytracing in WebGL/GLSL but won’t necessarily be easy to integrate with Cesium. Could you give more details about the type of rendering you are trying to do?

---

<div class="post-metadata">

**Author:** ![Ruediger\_Brand](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ruediger_brand/32/4004_2.png) [@Ruediger\_Brand](https://community.cesium.com/u/Ruediger_Brand)\
**Post date:** [March 3, 2017, 7:40pm UTC](https://community.cesium.com/t/custom-renderer-shader-possibilities/5235/4 "2017-03-03T19:40:34Z")

</div>

Hi Sean, Hannah,

thank you for the response.

Concerning rendering:

Our partner has it’s own datastructure for a pointcloud and algorithms to search and navigate within this structure.

Rendering a scene, i.e. pointclouds, we discuss posibilities of integration - so I asked here.

One idea was writing a service for the rendering resp. a renderer, but I don’t where is the starting point.

I can deliver more details next week.

Regards

Rüdiger
