   Screendoor transparency
  Hi,i'll try to understand screendoor transparency. I've found an exemple but i don't know if this exemple work good. The sphere must be transparent but it looks not very fine, is it normal for the screen door transparency or is this exemple wrong?Here an image:http://img141.imageshack.us/my.php?image=immagine9sx.jpgI don't understand what this code does and how polygon stipple work to implement trasparency:....GLfloat sphere_mat[] = {1.f, .5f, 0.f, 1.f};glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, sphere_mat);gluSphere(sphere, .3, 20, 64);....glEnable(GL_POLYGON_STIPPLE);glPolygonStipple((GLubyte *) spherePattern);create_stipple_pattern(spherePattern, .5);....void create_stipple_pattern(GLuint * pat, GLfloat opacity){int x, y;long threshold = (long) ((float) 0x7fffffff * (1.f - opacity));for (y = 0; y < 32; y++) {pat[y] = 0;for (x = 0; x < 32; x++) {if (random() > threshold)pat[y] |= (1 << x);}}}Thank'sGreta   
  Old games used screendoor transparency to simulate an alpha channel when it was unavailable.Figure 1: Screendoor transparency used for smoke.Notice the smoke: it looks KINDA transluscent but it isn't quite that way. It's obvious there isn't an alpha channel at work here.Figure 2: Scaled 2x.A scaled up version reveals that every other pixel is omitted.That sphere looks correct, but the filter you're using to acheive the effect might be wrong. Try removing every other pixel and you might get a better result (assuming you want 50% transluscency.)The code you posted basically sets a random stipple pattern. This might not be what you want...   ;  Ah, takes you back a little doesn't it (got to love the retro video game look every now and then).A random stipple pattern is definately not the best idea.  You should use an evenly spaced grid of blackened pixels to create the effect.  The more closely packed the blackened pixels are, the darker the image will appear.  Also, using an even grid will give you a more even look.   