View Full Version : cubemapping and texture coordinates

04-05-2011, 08:40 AM

I try to render the triangles of a model into a cubemap texture. Since my last issues (post sent on the beginner forum), I improved quite a lot, mainly all the triangle sharing texture face are drawn.
For this, I simply render the texture coordinates into the appropriate texture of the cubemap. However, the bottom-right and top-right corner of the back texture (-Z) stays white (see attachment).

I am sure to draw all the triangles, all parts of triangles in each face.
I noticed that if I decrease my epsilon (floating point error delta used for comparison) a lot (value set to 0.01 for a model with 2 units lenght), these undrawn parts disappear, but lead to other issues on other faces.

I also tried to render Z faces first, then Y faces... (since the order of comparison is application dependant in implementation of GL cubemap, according to the specs), but with no success.

From glanned information on the net, it could be due to a T portion (where 3 faces share a same vertex if I understood well), and could have had happend on first hardware implementation of cubemap since hardware wasn't able to cross calculate coordinates with several faces, but hardware could (still in the past) use special techniques to remove these kind of error... Could it be true ? What kind of techniques could they use ? And if I want something not approximated, where can I go ?

I'm starting to loose hope...

Anyone tried to do so ? Anyone succeeded ? Any comment ? Thanks for any help...