3D-Wind-Field
3D-Wind-Field copied to clipboard
Question regarding coloring.
I found out that the colors are defined in file segmentDraw.frag but can only be defined as a solid color. Is there a way to define gradient colors to different speed? I saw in another post that you commented to “access the texture of step 1 and decide which color to use when drawing the lines” in order to change the colors to different speed, but I wasn’t sure how to do this. Is this done in frontend(java script) or row(glsl)?Would you give me some guidance on how to change the colors for different speed in gradient? Thank you!
Is this done in frontend(java script) or row(glsl)?
The particle color is displayed by GLSL program
Would you give me some guidance on how to change the colors for different speed in gradient?
Basically you just need to pre-define a color table and pass it to GLSL program, then output different color according to the speed of particle in GLSL program. You can refer to my previous deleted implementation commit "remove color table"
A few months ago, I modified this demo as a npm module "cesium-particle" , which based on the respected author's achievements and supports color table rendering.You can refer to it.