vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
1.97k stars 293 forks source link

Is it possible to use custom material / shaders for arcs and hex bins? #137

Closed lukouko closed 1 year ago

lukouko commented 1 year ago

Awesome library, appreciate all the effort.

I couldn't figure out how to utilise custom materials and shaders for the arc and hex bin layers. I'm trying to create effects similar to the github globe: https://github.blog/2020-12-21-how-we-built-the-github-globe/

Is that currently possible in globe.gl? I can see how to use flat colours and gradients, but not more advanced materials. Could somebody please point me at some examples if it's possible?

Thanks!

lukouko commented 1 year ago

I'm a threeJS noob and after reading up on post processing, I saw the postProcessingComposer function. I was able to get quite close to what I needed by adding a bloom pass to the post processing composer.

One thing that's still a little challenging is applying post processing to only the objects in the layers. Reading around I think that would involve quite a bit of the work in the library, but if it's doable it would be a very cool feature.