Skip to content

inconsistent anti-aliasing with OpenGL #256

Closed

Description

@processing-bugs

Original author: b...@processing.org (June 07, 2010 01:18:12)

This bug automatically added from:
http://dev.processing.org/bugs/show_bug.cgi?id=1413

Comment from jeffg, 2009-12-15 19:14

I'm not sure if a bug report was ever filed on this.. but it is based on
this thread.
http://processing.org/discourse/yabb2/YaBB.pl?num=1250870750

Antialias does not work properly in recent processing versions unless you
first do a " hint(DISABLE_OPENGL_2X_SMOOTH);" Then you can reenable it or
smooth() or whatever. If you don't disable it first, you don't get the
best AntiAlias quality.

void setup() {
size(320,240,OPENGL);
hint(DISABLE_OPENGL_2X_SMOOTH);
//hint(ENABLE_OPENGL_4X_SMOOTH); //after disabling the 2x this works fine
smooth(); // this works even better than the 4x! super-smooth! ;)
}

Original issue: http://code.google.com/p/processing/issues/detail?id=217

Activity

  1. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:12
    Comment from fry, 2009-12-16 06:57

    Thanks for the report, nobody had bothered to post this yet, so I wasn't
    aware that it was this prevalent. What hardware are you running? I also
    suspect this depends heavily on the graphics hardware (thought I saw a
    handful of MacBook Pros on that thread) as to the exact behavior.

    The hint() vs. smooth() discrepancy is that smooth() makes the OpenGL
    smoothing calls (or at least did previously), while the hint() just handles
    FSAA. FSAA should almost always give better results in terms of overall
    consistency (the GL smoothing calls tend to overdo it).

  2. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:13
    Comment from jeffg, 2009-12-16 07:51

    (In reply to comment #1)

          Additional Comment #1 From
          fry
          2009-12-16 06:57 
    
          <!-- 
            addReplyLink(1); //-->[reply]
    
    
    
    
      Thanks for the report, nobody had bothered to post this yet, so I
    

    wasn't
    aware that it was this prevalent. What hardware are you running? I also
    suspect this depends heavily on the graphics hardware (thought I saw a
    handful of MacBook Pros on that thread) as to the exact behavior.

    The hint() vs. smooth() discrepancy is that smooth() makes the OpenGL
    smoothing calls (or at least did previously), while the hint() just handles
    FSAA. FSAA should almost always give better results in terms of overall
    consistency (the GL smoothing calls tend to overdo it).

    I'm running a MacBook Pro with 10.6.2.
    From what I understand and testing the bug, it's wasn't a hint() vs.
    smooth() issue. Neither worked. Using "hint(DISABLE_OPENGL_4X_SMOOTH);
    and "GL_LINE_SMOOTH" was just as ineffective as using smooth(). The
    problem was that nothing worked correct until you first did a disable hint
    for 2X_SMOOTH, then everything works fine (both hint() and smooth()).

  3. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:13
    Comment from taifunbrowser, 2009-12-16 09:32

    So, it appears that there are in fact 4 states to opengl smoothing, where
    processing assumes there are only 3:

    States:

    1. No antialiasing
    2. Antialias, 2x
    3. Antialias, 4x
    4. Antialias, UNLIMITED

    Where choice 2 is apparantly default, 4 is achieved by disabling #2 and
    calling smooth() anyway.

  4. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:14
    Comment from fry, 2009-12-16 09:38

    No, there are four that are covered by Processing:

    1. no smoothing, via noSmooth()
    2. the default, which is 2x fsaa
    3. 4x fsaa, by calling hint(4X)
    4. smooth() which calls gl.glEnable(GL.GL_XXXXX_SMOOTH); methods, but is
      ignored when FSAA is enabled (actually now i look and see that it's only
      ignored on 2x, but should also be on 4x).
  5. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From andres.c...@gmail.com on November 20, 2012 19:42:58
    Anti-aliasing has been completely reworked in 2.0. gl.glEnable(GL.GL_XXXXX_SMOOTH) are not used anymore. Now, there are two anti-aliasing configurations in Processing:

    1. no smoothing, via noSmooth()
    2. Nx fsaa, by calling smooth(N). N must be smaller or equal than the maximum number of samples supported by the hardware. N = 2 is the default.
  6. github-actions commented on Jun 18, 2021

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  7. locked as resolved and limited conversation to collaborators on Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    corehighimported

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions