glob3mobile / g3m

The multiplatform advanced visualization framework
http://www.glob3mobile.com/
Other
116 stars 56 forks source link

Line Rendering Issue? #101

Closed dtvasquez closed 9 years ago

dtvasquez commented 9 years ago

I've noticed when drawing lines using a DirectMesh seems to have rendering issues on lower resolution screens.

The further from the surface the camera moves, the less stable the line becomes, until it reaches a point where it no longer renders. The screen captures don't quite show the entire issue. It appears to be some sort of z fighting between the line and the planet.

At first I thought it might have something to do with the rendering of the globe, but the issue also happens on the flat map.

Nexus 4 (1280x720, Android 4.2.2) line_bad

Nexus 9 (2048x1536, Android 5.0.1) ling_good

Initially, the height from the surface was set to 1500 meters. At 15 000, it was more stable, and so one until it was the most stable at 1 000 000 meters. Issue replicates on a Samsung Galaxy Tab running Android 4.4.4.

DiegoGomezDeck commented 9 years ago

To me, it looks like a z-fighting issue.

Did you try disabling the depth-test? (Search for the depthTest parameter in the constructor of DirectMesh).

dtvasquez commented 9 years ago

Beautiful! That fixed it.

Thank you.