osgearth icon indicating copy to clipboard operation
osgearth copied to clipboard

Bad blending with draped technique

Open JD31 opened this issue 5 years ago • 1 comments

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.

JD31 avatar Sep 21 '20 14:09 JD31

And to make it an option : https://github.com/MPcoreDev/osgearth/commit/431bef707a081a2ea78f15f2eb3f09f83af33de3

JD31 avatar Sep 22 '20 12:09 JD31

duplicate - fixed in main

gwaldron avatar Apr 06 '23 12:04 gwaldron