osgearth
osgearth copied to clipboard
Bad blending with draped technique
With draped technique, the geometries are well blended between them, but are badlt blended with the terrain.
Example:
- set terrain color to full green (00FF00)
- add some polygons with full red color (FF0000)
- add one polygon overlaping one red polygon and the terrain with full blue color with an alpha (0000FF99)
The results are:
- blue polygon overlaping the red polygon (with hex99 of alpha)
- we expect 153 (=hex99) of blue and 102 of red (255-153) --> OK
- blue polygon overlaping the green terrain color (with hex99 of alpha)
- we expect 153 (=hex99) of blue and 102 of green (255-153) --> KO The resulted blue component is 92(dec) instead of 102
Here is a proposition of correction from our fork: https://github.com/MPcoreDev/osgearth/commit/ecd148090f03d077fe28ee7b4be773a0e4b8d961
Not sure it is the right approach but it does the trick.
And to make it an option : https://github.com/MPcoreDev/osgearth/commit/431bef707a081a2ea78f15f2eb3f09f83af33de3
duplicate - fixed in main