Prime Members - Reputation: 1135
Posted 12 December 2012 - 05:15 PM
The reason is that you can't just draw transparent/blended pixels in random order (depending a bit on your blending and transparency testing methods enabled). In picture2, the foreground image got rendered first. Even though its transparent, also the non-filled pixels wrote a depth value to the depth buffer. After that, you rendered the second quad in the background. But before just plotting those pixels on the canvas, the graphics engine is testing if there is nothing in the foreground occluding it, by comparing depth. Monkey farts, it seems that the quad in front is blocking your way.
Sorting from back- to forward is one way to prevent this, though it still doesn't always work for quads intersecting each other. Second, check your blending / transparency testing options. Transparent pixels shouldn't write a depth value either. If you are using a shader, the fragmentshader for example could simply kill the transparent pixels to prevent this.
Crossbones+ - Reputation: 21893
Posted 12 December 2012 - 06:54 PM
My Art: http://l-spiro.deviantart.com/gallery/4844241/Realism My Music: https://soundcloud.com/l-spiro
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums