How MPGeometry works?

classic Classic list List threaded Threaded
7 messages Options
zzdy2003 zzdy2003
Reply | Threaded
Open this post in threaded view
|

How MPGeometry works?

Hi,
I want to know how MPGeometry works? That is to say, how can it blend multi image layers? In MPGeometry::renderPrimitives(), I found a loop for these image layers, each called glDrawElelments() once. So my question is why there is no z-fighting?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How MPGeometry works?

MPGeometry renders image tiles in a multi-pass fashion. There is no Z-flighting because it is rendering the exact same geometry each pass (so the resulting depth values are identical) and the engine sets the depth testing function to GL_LEQUAL so that the Z test always passes. (This happens in MPTerrainEngineNode.) It then uses GL blending with pre-multiplied alpha to composite the layers.
Glenn Waldron / Pelican Mapping
zzdy2003 zzdy2003
Reply | Threaded
Open this post in threaded view
|

Re: How MPGeometry works?

In reply to this post by zzdy2003
Thank you!

Why not use multi-texture? just to break the limitation of number of image layers? Multi-pass, multi-texture, which one is more efficient?
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: How MPGeometry works?

We used multitexture for years, but just recently moved to using multipass to get around limitations on the number of texture layers available on the graphics card.

Jason


On Sun, Jun 9, 2013 at 10:57 PM, zzdy2003 [via osgEarth] <[hidden email]> wrote:
Thank you!

Why not use multi-texture? just to break the limitation of number of image layers? Multi-pass, multi-texture, which one is more efficient?


If you reply to this email, your message will be added to the discussion below:
http://forum.osgearth.org/How-MPGeometry-works-tp7581568p7581583.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.
NAML

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How MPGeometry works?

In reply to this post by zzdy2003
We measured no loss in performance moving to multi-pass at the tile level. In many cases, multi-pass benchmarks faster than multitexture.
Glenn Waldron / Pelican Mapping
zzdy2003 zzdy2003
Reply | Threaded
Open this post in threaded view
|

Re: How MPGeometry works?

Thank you.
ldj ldj
Reply | Threaded
Open this post in threaded view
|

Re: How MPGeometry works?

gwaldron:
   how do you do!
  how to add image with texcoords to MPGeometry in application?