CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.43k stars 3.39k forks source link

Decouple label fill color and outline color from internal glyphs #955

Open shunter opened 11 years ago

shunter commented 11 years ago

Labels are drawn using an internally-managed texture atlas of glyphs. Right now, those glyphs have the fill and outline colors baked into them, which means that two labels that only differ in color are drawn into separate textures. This makes it expensive to change color, and unfeasible to smoothly interpolate label colors.

It would be better to decouple the shape of the glyph from the color information, essentially draw all glyphs in black & white and replace the colors in the shader.

emackey commented 11 years ago

I'll suggest drawing the fill color as one channel (say FF0000) and the outline color as another (00FF00). Then the shader can look at the intensities of the two channels, in case they've been anti-aliased or blended together, and blend the correct colors based on those amounts.

pjcozzi commented 7 years ago

@bagnell will your vector tile work fix this? Can we cherry pick those commits before merging all of 3d-tiles to master?