1. A concise explanation of the problem you're experiencing.
Hi,
we are researching and developing a model for pollution distribution in an affected geographical area depending, as of now, on weather conditions (mainly wind and rain), but later maybe on geographical natural barriers, due to ground elevation, too.
We'd like to display such computed model as heatmaps on Cesium (we already do it on 2D maps).
After a pretty extensive search on this forum and Cesium documentation I figured out that a Rectangle primitive with a custom MaterialAppeareance would probably suffice.
That would be probably ok if there was any way to pass to its, customized by me, fragment shader a few uniforms as a couple of vec2 arrays and optionally (if possible) a two channel float texture (representing a, quite small, vector field used for the computations) to be bilinearly sampled in the shader.
I succeded passing simple uniforms via Fabric, but it looks like it not supporting arrays yet.
On the other end I saw there's a Uniform class which might do the trick but I don't know how to couple it with the fragment shader in the material.
Is that the right way to go?
And if yes, how to do it ?
I played a bit with the idea of writing a custom primitive, exploring its source code, but I could not really come out to anything meaningful because of lack documentation (I didn't even understand if it may have been the right way for passing such kind of custom uniforms to the shader).
Thanks in advance for any help, code examples or hints you may give to me.
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
None
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Display a heat map real time-computed in a rectangle's material fragment shader.
4. The Cesium version you're using, your operating system and browser.
Cesium 1.57, Windows 10 64bit, Google Chrome 74.0.3729.157 official build 64bit