Bug 696 : text and images with alpha not setting zbuffer in P3D
Last modified: 2007-11-30 14:12




Status:
ASSIGNED
Resolution:
-
Priority:
P3
Severity:
normal

 

Reporter:
Olivier
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2007-11-30 13:50
The text display does not consider the z-order but rather the order in the
code.

See the following code, the first text is no fully displayed, while the 2nd
one is correctly displayed.

Same behaviour for versions 134,133,130,124, Win XP.

void setup(){
size(400, 400, P3D);
textFont(loadFont("MonotypeCorsiva-48.vlw"),24);

}

void draw()
{
background(0);

fill(255);
text("Z=2 at 20,20",20,20,2);

translate(0,0,0); // same with or without
fill(0,0,200);
rect(0,0,100,100);

fill(255);
text("Z=2 at 40,40",40,40,2);

}
Additional Comment #1 From fry 2007-11-30 14:12
need to set some kind of threshold on opacity for pixels with alpha to set
the zbuffer. otherwise zbuffer issues occur because textures (text and
images) are invisible to objects drawn later.

in the meantime, opengl works correctly, though it has the opposite
issue--creating black halos around the first text drawn. (discussed on the
troubleshooting page, bug #176)
This bug is now being tracked here.