Results 1 to 4 of 4

Thread: lots of transparent quads

  1. #1

    lots of transparent quads

    I want to put a whole bunch of transparent quads in parallel intersecting a whole bunch of transparent quads perpendicular to these. Due to the draw order, it looks good from some angles, and bad from others. Do I have to break these up into a bunch of smaller quads to get it to look right? (cross-section below)

    | | | |

  2. #2
    Member Contributor
    Join Date
    May 2000
    Ottawa, Ontario, Canada

    Re: lots of transparent quads

    If you are not using textures, make each quad a pair (or more) of triangles, otherwise lighting will suck. With triangles, you get a vertex crossing the centre of the rectangle (or square), where the lighting is calcd. Assume you are generating normals and assume the "looks bad" is a lighting effect. I've found triangles always work better for lighting (more vertices).

  3. #3
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    milano, italy

    Re: lots of transparent quads

    you have to depthsort.
    it looks bad because if you draw a quad here and then another quad a bit farther behind, this will appear broken.
    the z-buffer in fact decides if a fragment can pass or is to be discarded.

    the best way is to depth sorth in back to front order the alpha blended primitives, or else in front to back order but with depth buffer test disabled.
    it all depends on what you have to do with these quads.

    another way could be to use the alpha test capability of gl.
    polygons will appear broken the same, but this way is less noticeable.

    to activate alpha test, do:


    fragments with a alpha component of 0 won't be rendered, so the completely transparent parts of your textures (if you're using texturing, of course) will be invisible.


  4. #4

    Re: lots of transparent quads

    Thanks for the ideas. I'll try and them, and if I have trouble, I'm sure you'll hear from me!

Similar Threads

  1. Replies: 2
    Last Post: 10-19-2017, 08:06 AM
  2. Trying to use MesaGL... Need lots of help.
    By in forum OpenGL: Linux
    Replies: 1
    Last Post: 09-11-2003, 01:53 AM
  3. Lots of RCs
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 07-31-2003, 06:11 PM
  4. Transparent QUADS
    By djavan in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 02-17-2003, 06:29 PM
  5. lots of questions.....
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-22-2001, 08:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean