Results 1 to 2 of 2

Thread: Blending Problems

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    New Zealand

    Blending Problems

    i draw to the screen a textured cube and then enable blending and make sure depth testing is disabled then wrote :
    ...(stuff that draws the front face)
    and it draws the cube with the texture on it and it is blended but when i rotate it so that another face is facing me, sometimes it looks more transperent or less depending on which face im viewing

    can anyone help?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Portsmouth, Hampshire, England

    Re: Blending Problems

    IT sounds like you're drawing your transparent cube faces in the wrong order.

    When you draw transparent primitives, you have to render them in the order back to front. Otherwise it doesn't look right.

    A trick for convex objects, is to do this.

    Enable Front face culling.
    Render Object.
    Enable Back face culling.
    Render object.

    That way, the polys in front of the object will be drawn over the top of the polys behind, regardless of how you rotate it.

    See the CVA demo on my website to see this in action.


Similar Threads

  1. Replies: 1
    Last Post: 05-01-2013, 09:37 PM
  2. Problems with tga and blending
    By lud2k in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-20-2006, 01:51 PM
  3. Blending problems
    By Nychold in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-29-2004, 03:09 PM
  4. Some new blending problems...
    By SunSailor in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 08-13-2001, 08:10 PM
  5. problems with blending....
    By dodgyposse in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 02-15-2001, 11:07 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