IPhone OpenGL ES anti-aliasing?

Is it possible to enable anti-aliasing for OpenGL ES on the iPhone? I've tried a few different things:
glBlendFunc(GLSRCALPHA, GLONE_MINUS_SRCALPHA);
glEnable(GL_BLEND);
glEnable(GL_SMOOTH);
glEnable(GL_MULTISAMPLE);
and a few others, but none of them work. I'm not exactly an OpenGL heavy, so I wouldn't know if these were even the right kinds of things to enable for anti-aliasing content (it seems like GL_SMOOTH or GL_MULTISAMPLE would work). It seems like the general consensus for OpenGL ES is that anti-aliasing is platform-dependent, but I haven't seen anything which says whether it's possible on the iPhone. I would assume that it would be possible on the iPhone, considering that things drawn with the Quartz CG methods are anti-aliased by default. It looks to me, though, like the only way to do it would be to render into a buffer with two times the width and height, and then scale it down to fit the display. That seems a little bit processor heavy, though, especially on a mobile device. Any input would be greatly appreciated .
Sonny Jim

I've accomplished FSAA(full screen antialiasing) on the iPhone by rendering the same scene multiple times and jittering the perspective matrix.
The technique has been used since the 70s. Details on the technique can be found at http://www.opengl.org/resources/code/samples/advanced/advanced97/notes/node63.ht ml
The iPhone doesn't have an accumulation buffer, but you can still use the same idea by faking an accumulation buffer by copying the contents of the color buffer and blending the passes together yourself. If you depth-sort your scene you can just blend everything together and forget about an accumulation buffer.
There are variations on this technique where you re-render the scene several times in wireframe mode and use the results to antialias just the edges of polygons.
I'm doing a puzzle game that never has a front-facing polygon behind another front-facing polygon, so I don't have to mess around with faking an accumulation buffer or worry about depth sorting. Remember that this will make your fps drop by whatever factor you antialias.

Similar Messages

  • [ iPhone ] OpenGL ES glLineWidth()

    Hey guys,
    Quick question: I'm using OpenGL on the iPhone and have code to set the width of rendered lines using glLineWidth(). This works great in the simulator but doesn't seem to work on an actual device.
    I've searched the specification for OpenGL ES and it definitely should be functioning correctly. Anyone know i need to do anything special to get this feature to work on a device? Or if it's just not supported ( hopefully not )?
    Thanks!

    Is GLLINESMOOTH enabled? The iPhone does not support anti-aliased lines. If you query the SMOOTHLINE_WIDTHRANGE, it reports (1,1), which is kind of a hint that it doesn't work (ie, line widths are clamped to 1). Smoothed lines (and points) have long been a very inconsistent thing in OpenGL implementations, so the iPhone is not alone in having problems with it.
    See http://homepage.mac.com/arekkusu/bugs/invariance/index.html for an example of desktop GL renderers, and also some sample code on how to use Framebuffer Blending + Texturing to create fake smooth lines. Note, by 'fake', I mean 'much better quality than most built-in smoothed-line implementations', and perfectly portable as well (unlike lines themselves).
    Your other (easier) option is to use non-smoothed lines.

  • What does the anti-aliasing feature of the graph do?

    I see when I right click a graph anti-aliasing is an option. What does this feature on the graph allow you to do?

    > I see when I right click a graph anti-aliasing is an option. What does
    > this feature on the graph allow you to do?
    As Dennis points out, it smooths the image. Specifically, computer
    graphics on a raster device have stair-steps or jaggies. This occurs
    because a sloping line is being approximated by setting pixels in a grid
    to either the foreground or background color. For this example, lets
    assume the BG is black and FG is white. At 45 deg and certain other
    nice angles, the lines look relatively smooth, like the diagonals on a
    chess board, but at other angles, they are heavily aliased or jaggy.
    Anti-aliasing sets the color of the pixels to black, white, or shades of
    gray depending on the amount of the pixel that intersects the
    mathematical d
    efinition of the line. This extra math slows things down,
    and the fact that the anti-aliasing is done not by windows, by by an
    OpenGL driver in its own memory buffer slows it down further. For
    slowly changing plots, they look quite nice. This doesn't make sense
    for dense data or quickly changing data.
    Greg McKaskle

  • How to enable anti-aliasing?

    hi!
    I simply cannot force anti-aliasing (FSAA).
    for example:
    GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
    Canvas 3D c = new Canvas3D(config);
    renders canvas w/o AA (I can enable it manually in my GeForce4 settings, but I want to be enabled by program)
    another try:
    GraphicsConfigTemplate3D gc3D = new GraphicsConfigTemplate3D();
    gc3D.setSceneAntialiasing( GraphicsConfigTemplate.REQUIRED);
    GraphicsDevice gd[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
    Canvas3D c = new Canvas3D(gd[0].getBestConfiguration(gc3D ), false);
    this gives worst result - AA is always disabled, no matter it is set to REQUIRED.
    Can somebody show me sample code enabling (and possibly +disabling) FSAA in Java3D?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    still no success :((
    I tried almost everything -
    OpenGL and DX versions of java3D;
    different video cards (!)
    java -Dj3d.implicitAntialiasing=true MyProgram (according readme)
    any advice?

  • Photoshop CC Text Anti-aliasing problem.

    Hey guys, not sure if anyone else has experienced this problem, but today I turned on my machine and starting layout out some type and noticed that it looked alot chunkier than before. I had my anti-aliasing set to Mac LCD, which is usually spot on, but this particular text field looked terrible. I opened an old document and sure enough, I was right, the same type of anti-aliasing looked vastly different, even when both of the typfaces were exactly the same. I've had others open the file on their machines and have gotten the same problem. Now every time I create a new text field, I get chunky, terrible looking anti-aliasing, no matter what font I'm using. The only way I can get good looking type is by copying and pasting from old files. I've included an example file of what I mean. On the left is Trade Gothic, and on the right is Trajan (just to show it's not any particular font). The top versions of the fonts look beautiful clean, and anti-aliased properly. The bottom versions look chunky and blurry. Any help would be much appreciated!
    Download the file here: http://cl.ly/3I2L2f163q3z

    Same problem here.
    This fixed it for me. Though, only temporarily:
    1. Select all layers of your PSD file.
    2. Select the type drop down > Anti-Aliasing > None
    3. Save your file
    4. Quit Photoshop
    5.  Re-open the file
    6. Select all layers of your PSD again
    7. Select the type drop down > Mac LCD (or desired aliasing)
    8. Save the file
    9. Continue working
    This worked the last few times I tried but it is not a permanent solution.
    I feel your pain

  • Photoshop CS4 Brushes not Anti Aliasing properly

    I've just set up CS4 and my brushes are not anti aliasing properly. There are no soft edges on any of them. I'm able to get a pressure sensitive opacity change on the stroke but the edges are all pixelated.
    Here is an image (this is a soft brush. notice none of the feathering/anti aliasing is there):
    http://craji.com/images/adobeproblem.jpg
    I've updated the newest gpu drivers for my Nvidia 8800 GTS.
    I'm running XP SP3 with dual monitors. An Apple 30" and a Cintiq 21"
    I've tried placing the main photoshop window on both monitors (one at a time) to test if that was causing it and i've had no luck.
    All of the options in my GPU Enabled are currently unchecked (since they were giving me lag issues on my brush stroke when they were checked).
    Any help (even linking me to something similar in this forum) is greatly appreciated.
    Cheers-

    Definitely not file dependent. I'll open a photo in sRGB 8bit, or create a new document with any settings from cmyk/rgb/bw 8/16 etc.
    I'm wondering if it has something to do with my Nvidia Display Property utility. I use it to gamma up my secondary monitor (cintiq). Although disabling that utility didn't resolve it..
    I'll try uninstalling and reinstalling tonight if no one is having similar problems. Maybe that will fix it.

  • CS5 bug rendering anti-aliased text in 'Save for web'

    Seems like there's a bit of a bug when using 'Save for web and devices' with thin weights of type in CS5 for Mac. Although thin type looks fine while working in Illustrator, as soon as you enter the 'Save for web' dialogue, it gets badly mangled. Looks like this issue has been present at least since CS4. It does not happen in Photoshop. It looks particularly bad for light text on a dark background.
    Some people may say "sure, Illustrator is not really meant for intensive bitmap work". However, with features like 'pixel preview' and 'snap to pixel', Illustrator has (generally) become a very viable tool for web design, and personally I much prefer it to Photoshop. It is also clear that Adobe intends it to be usable in this manner. So the anti-aliasing render bug is definitely a problem. Just surprised they didn't address it when CS5 was born.
    I put up some example images on http://www.thesheep.co.uk/2011/06/24/illustrator-save-for-web-anti-aliasing-problems/ to illustrate the problem.
    Does anyone have any clever work-arounds for this? It's a bit annoying to have to move stuff over to PS before exporting, but maybe that's what I have to do. Hopefully Adobe will address this soon.

    Hi,
    I am experiencing this same problem of pixelated gifs when I use the "save for web" dialog from Illustrator, but this solution has not worked for me. I have tried the trick of using type-optimized anti-aliasing, but it doesn't change the output at all. I've done this from within the "Image size" tab as well as through Effect>Rasterize>Options)Anti-aliasing: Type Optimized. My image is a logo made entirely from text, although for some of it I used "outline path", so I'm not sure if it still qualifies as text...I'm a newbie at this stuff, so the technical details are still quite opaque to me.
    Does anyone know of a solution to this that does not require me to add Photoshop to my workflow?
    I'm using Illustrator in CS5, version 15.0.2.
    Thanks in advance
    Jonathan

  • Type anti-aliasing in Save For Web CS5

    Hi,
    Has anyone found a way to get the type anti-aliasing settings to maintain their appearences in Save For Web.
    The type looks very different as if its lost the settings when I go to save it.
    Thanks!

    Well I set the type to Sharp in the anti-alias settings in the Character dialog.
    When I go save for web regardless of the output settings the aliasing gets all blurry like it never was set.

  • Font appears different in Muse (without smooth anti aliasing)

    I am using Google Font Roboto and noticed that it appears thicker when i type it in Muse than in Photoshop. When i have anti-aliasing on 'Strong' in photoshop it mirrors what is showing in Muse, but i prefer the default Smooth anti-aliasing. Is there a way to turn this on in Muse?

    Adobe Muse CC 2014 (font strong, bolder)
    https://db.tt/JMZhwPtT
    Photoshop CC 2014 (Correct version)
    https://db.tt/QLQtxYZL
    Whats interesting is the output in a web browser varies from browser to browser and computer to computer. I've tried it on many computers and browsers. It shows correctly on all macs in Safari but mostly incorrectly in Firefox and Chrome. However, i tried on a 2008 Lion Mac which works correctly in all browsers. On Windows computers it shows correctly nearly every time.

  • How do I get non anti-aliased vector rectangles in Photoshop CS5 using a Wacom Intuos 4?

    Hello,
    When using Photoshop CS5 to draw a vector rectangle using the Wacom Intuos 4, the rectangle comes out anti-aliased, but when I draw a rectangle using a mouse on the same machine, there is no anti-aliasing.
    What can I do to get sharp, non anti-aliased vector rectangles?
    Any help would be appreciated.
    Thank you

    c.pfaffenbichler, here is a screenshot of my problem:
    The red square was created using a mouse and the blue square was created using my Wacom pen, which you can see the anti-aliasing on.

  • Possible bug in Illustrator CS4 text anti-aliasing in Save for Web and Devices

    Hello all,
    This could be a bug... if so, I'd be happy to add it to Wade's bug list a few messages down the stream.
    Here's what's happening: when I create small text using a very thin font (in this case, Helvetica Neue Light), the Pixel Preview gives a noticeably different anti-aliasing solution to the actual output from Save for Web & Devices. I'm attaching an original .AI file as well as a screenshots of what I'm getting in both situations.
    I'd really prefer the Save for Web and Devices output to look exactly like the Pixel Preview. The font looks great in Illustrator but loses a lot of its punch when I Save for Web.
    ---Peter

    In the Svae for Web and Device  under the image tab where it says art Optimize that is a drop down menu select Type Optimize as such
    htis is what it lloks like in AI and a browser when you choose Type Optimize
    This the difference between Art Optimized and Type Optimize
    That is what is happening to you you are selcting Art Optimize and that is the reason when you choose art optimize aqnd you rraster the image it looks right to you.

  • The images in Photoshop or InDesign improperly anti-aliased, looking fuzzy

    I've bought Late 2013 Retina Macbook Pro with Mac OS Mavericks, and am having trouble with anti-aliasing.
    In short, the images/documents open in Photoshop or InDesign are improperly anti-aliased and look fuzzy.
    I can understand why the menu bars and stuff should appear fuzzy and blurry as a result of auto anti-aliasing; otherwise they might appear too small for eyes to see since the resolution is super high.
    But why should the machine want to blow up the images or documents inside the application and apply anti-aliasing to make them look so fuzzy?
    It would be grateful if there's a way to stop my computer doing the anti-aliasing all the stuff on screen.

    No, not that I know of - you do need to make certain that you're using the very latest versions of both apps, though.
    Clinton

  • Preview - anti aliasing and text in scanned pdf

    hello all,
    i have an issue with preview not anti aliasing text in pdf files.  to elaborate, take a pdf with text which is selectable and it appears jagged, not anti aliased as in pdfs with text which is treated as an image, i.e. not selectable.
    also, sometimes, when scrolling through pages in full screen, the following page has the text anti-aliased as the scroll animation is taking place, i.e. while the previous page is being moved away through the gesture, but once the previous page has disappeared and the new page 'settled in' the smoothing is gone.
    smooth text and line art is checked, as is lcd smoothing in general preferences.
    any suggestion are much appreciated.
    s.

    Hi 1ndivisible,
    Hmm, that's odd. My type is looking pretty decent out of Illustrator. Can you try a different font or the same font in a new sequence?
    Thanks,
    Kevin

  • REPORT: Bug in OS X's anti-aliasing w/ rotated screen

    This is a fairly substantial bug. This may not be the ideal place to post it, but could someone tell me where to submit this so Apple will take notice?
    A friend and I both have Mac Pros w/ ATI X1900 displays. This video card supports screen rotation in the OS X Displays control panel. So he went out and grabbed a rotating 1600x1200 Samsung (4:3) display to set next to his 30" Apple Cinema Display (both 1600 pixels tall, when the Samsung is in portrait orientation - a good match).
    Have a look at the setup:
    http://www.hubbuddy.com/downloads/dual/DSCN0914.jpg
    He has his 'Font smoothing style' in the Appearances prefs pane set to "Medium - best for flat panel." This setting uses subpixeling, providing up to 3x the horizontal resolution of the screen's native pixel width. (More about sub-pixeling here: http://www.grc.com/cleartype.htm )
    Sub-pixeling depends upon the orientation of the RGB elements of each sub-pixel cluster that makes up a pixel. When a screen is rotated 90-degrees, the RGB "stripes" run horizontal, not vertical. As can be seen from the below images, where the first image (ONE) shows the rotated Samsung and the second image (TWO) shows the standard orientation Apple Cinema 30", OS X's sub-pixeling does NOT take into account the new orientation of the sub-pixel clusters, resulting in a rather bold and crude rendering of text on the rotated first (ONE) image:
    http://www.hubbuddy.com/downloads/dual/one.jpg
    http://www.hubbuddy.com/downloads/dual/two.jpg
    Apple needs to correct this so that people don't have to abandon sub-pixeling and use 'Standard' (greyscale) anti-aliasing. Microsoft takes sub-pixel cluster orientation into account with Windows Mobile (CE) on the Pocket PC's. Surely Apple can get this working with rotated screens under OS X.
    Thanks. Where do I submit this?
    bp

    Digg this story...
    http://www.digg.com/apple/OSX_supports_screen_rotation_but_its_rotated_anti_aliasing_isbroken
    ...to get the word out. (Just trying to get this addressed.)
    blakespot

  • Why does scroll wheel temporarily kill anti-aliasing?

    I have an odd display problem within inDesign. I have anti-aliasing turned on. When I use the hand tool or scroll bars to move around my document, the newly revealed area is drawn correctly and quickly. But when using my mouse scroll wheel to move around a document-- horizontal scroll especially-- the revealed parts of the document are not anti-aliased (and drop shadows are not drawn). I can switch to the text tool, edit my copy, switch to the cursor and move/change objects, whatever I want, but anti-aliasing does not re-activate. Then the instant I use the hand tool or drag a scroll bar, suddenly everything is redrawn correctly once again. I have tweaked my display performance sliders several times, but no matter what quality settings and options I use, I can see that the problem is still there.
    Very annoying when I'm zoomed in looking at where I want a drop shadow to appear ... turn on its settings in the dialog box ... WHY WON'T IT GIVE ME MY SHADOW!? Oh, wait ... jiggle the page with the hand tool and suddenly it appears.
    I am not getting an error message. Hardware acceleration is working in Photoshop. Downloaded the latest version of Logitech Setpoint software; that didn't stop it.
    My system: InDesign CS4 ver. 6.0.4 on Windows Vista 64-bit; Logitech MX Revolution mouse; Dell 2209WAf monitor; ATI Radeon HD 4800 graphics card (already upgraded to more recent driver; didn't fix the issue).
    I doubt it's the mouse itself; I use the same model at work (where we have CS2) and I've never had this happen there.
    Help!
    Ross Hight

    Wish I could help but I am also experiencing the same problem. I just installed the newest video card drivers, however the problem still exists.
    64-bit Vista SP2
    CS 4
    Quadro fx 3800
    I have the same monitor as you and use a logitech mouse.
    I didn't know about the jiggle trick though, helps a bit.
    Thanks.

Maybe you are looking for