Results 1 to 5 of 5

Thread: Clip when Wc is negative

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2005
    Location
    Israel
    Posts
    20

    Clip when Wc is negative

    Is clipping done for negative Wc?
    What does it mean when Wc<0?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Berlin, Germany
    Posts
    188

    Re: Clip when Wc is negative

    Technically, negative homogenous components would negate/mirror the vector. (x, y, z, -w) = (-x, -y, -z, w). You should avoid negative homogenous components (both for texture coordinates and vertex positions) as OpenGL might not clip and interpolate those correctly.
    355/113 -- Not the famous irrational number PI, but an incredible simulation!

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2005
    Location
    Israel
    Posts
    20

    Re: Clip when Wc is negative

    Can you pleas direct me where it says that "OpenGL might not clip and interpolate those correctly"

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2005
    Location
    Israel
    Posts
    20

    Re: Clip when Wc is negative

    Can Wc be Zero??

  5. #5
    Senior Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Berlin, Germany
    Posts
    188

    Re: Clip when Wc is negative

    Appendix H of the OpenGL Programming Guide under "OpenGL Correctness Tips":
    Avoid using negative w vertex coordinates and negative q texture coordinates. OpenGL might not clip such coordinates correctly and might make interpolation errors when shading primitives defined by such coordinates.
    A zero homogenous component is allowed and refers to a vertex at infinity.
    355/113 -- Not the famous irrational number PI, but an incredible simulation!

Similar Threads

  1. Texture can not keep negative value?
    By apapaxionga in forum OpenGL: GLSL
    Replies: 8
    Last Post: 11-04-2011, 11:43 AM
  2. negative dashing?
    By Nils Pipenbrinck in forum OpenVG
    Replies: 3
    Last Post: 05-12-2006, 09:59 PM
  3. negative Z values
    By Paulo Costa in forum OpenGL: General
    Replies: 1
    Last Post: 08-29-2004, 11:35 PM
  4. negative space
    By AsylumX in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 05-31-2002, 04:15 AM
  5. Drawing negative
    By Kilam Malik in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 06-07-2001, 10:44 AM

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