I have a specific use-case in mind that I’d like to explain and get some clarification on. Let’s say I have geojson data with abstract polygons in it, and I’d like to render those polygons on my map. Let’s say I do this with Cesium’s GeoJsonDataSource.
What will happen internally is that essentially the GeoJSON is triangulated via the earcut library, and then it will eventually end up as a GeometryInstance stored in a PrimitiveCollection. So far, so good.
My question then is this: how are the vertices of the resulting triangulation deformed about the sphere so as to curve with the surface of the earth? What I’d specifically like to know is - does this happen on the CPU or in a shader? It would be very helpful if you could point me towards the specific code where this happens (be it in GLSL or javascript).
I’ve studied the CesiumJS internals extensively, and have a pretty good idea of how the rendering engine works and the overall structure of the project. So far, this is the only question that I haven’t been able to answer by reading the code itself.