Closed westnordost closed 6 years ago
Have you tried blend mode translucent
? :) The behavior that you expect needs a two-pass rendering - inlay
and overlay
are still useful for 2D geometries.
Ah I see, I did not know about translucent
, Tangram play did not show it as an option. So it does exactly that (two-pass-rendering) then(?).
Perhaps the tangram documentation could be updated - is there a public repository for that?
Here is the public repo for the docs @westnordost: https://github.com/tangrams/tangram-docs and its updated with blend: translucent
(https://github.com/tangrams/tangram-docs/blob/fde623b7a90dfad170f921f4a5a08188ae1e9f98/pages/styles.md#blend)
Cool, thanks for the hint!
So I understood the documentation of the
inlay
andoverlay
blend mode to be in concept likeopaque
, only that it allows alpha within the layer so that it can be interlaced into the scene.Now, the outcome is a bit different as expected (for extruded features):
This is something that of course can be expected from the
multiply
(andadd
) blend mode, but I find it certainly unexpected from theinlay
/overlay
blend mode.It is even more apparent in this demo scene, where I changed the map background to turqoise: Here is a minimal demo scene You see that the buildings themselves do not appear transparent, but they appear transparent to each other only. (Compare with
multiply
andopaque
blend mode.)So, to recap: As a user, I would expect the blend mode
inlay
andoverlay
to draw all the features in the draw rule as opaque (to each other) and fiddle in this layer into the rest of the scene.I did not check if the same behavior occurs for tangram-ES.