New Alpha to coverage demo

Discussion in 'Architecture and Products' started by Humus, Jun 23, 2005.

  1. wireframe

    Veteran

    Joined:
    Jul 14, 2004
    Messages:
    1,347
    Likes Received:
    33
    Ok, I retract everything! I completely missed the point that the problem only appears when multisampling is enabled. I had AA disabled (well, "application controlled") and was wondering how you all mananged to get such ugly jaggies. I turned on 4x MSAA and, sure enough, there were the rough edges.

    Update (as I type):

    Nope! Something weird is going on here. It seems everything is being anti-aliased with anti-aliasing set to "application controlled". I just realized there were no jaggies anywhere in the image (that's what you get for staring too much at the fences). Could there be some remnant of the earlier super-sampling demo affecting this one? Perhaps a bug only showing up on Nvidia cards with super-sampling in the drivers?

    LOL. I should have posted some screen shots before but I had a hard time figuring out the internal command (F9) for multiple shots at different settings at the same camera position. Both modes look absolutely gorgeous here. However, forcing MSAA in the control panel makes it look just as ugly with "alpha test" as some of images shown here.
     
  2. DudeMiester

    Regular

    Joined:
    Aug 10, 2004
    Messages:
    636
    Likes Received:
    10
    Location:
    San Francisco, CA
    Using AAx8S on 6800GT drivers v77.12, and I must say it looks fantastic! Especially on sharp angles, although there is noticable dithering when you get really close, the trade-off is more then acceptable. Even at 640x480 the dithering is hardly a concern. Also, when you zoom out to the side and slide right and left observing the parallax between two layers of alpha blended surfaces, the difference is nothing short of remarkable. Instead of just a mess of pixels, there are two recognisable surfaces!
     
  3. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    The demo turns on multisampling by itself. You shouldn't have to enable it in the driver control panel. It may be the case though that if you enable supersampling in the driver that that takes precedence over the application's requestion for multisampling.

    To compare alpha test vs. alpha-to-coverage you need to toggle it on the F1 menu.
     
  4. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    I have some VSync code in there, but it's not in use. I did use it in the past, check registry at HKEY_LOCAL_MACHINE\SOFTWARE\Humus and if you find a VSync key you can set it to 0. It may help with some older demos I guess, but it should have no effect on this demo.
     
  5. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    I think that's the main reason. On top of my head I can't think of any fairly new OpenGL game that is [ab]using alpha test that would need it.
     
  6. wireframe

    Veteran

    Joined:
    Jul 14, 2004
    Messages:
    1,347
    Likes Received:
    33
    Strange. It acts completey different if I set it to MSAA or "application controlled". I must say the "app controlled" looks like it is supersampling. Everything looks perfect, including the alpha textures. With MSAA forced in the CP I see the same harsh jaggedness others are seeing and posting (I assume).
     
  7. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    How's the performance? Is MSAA and "application controlled" running at very difference fps?
     
  8. Ostsol

    Veteran

    Joined:
    Nov 19, 2002
    Messages:
    1,765
    Likes Received:
    0
    Location:
    Edmonton, Alberta, Canada
    Well, not quite like super-sampling, but quite good indeed. Humus's example is a general case scenario, and fortunately one's viewpoint is rarely close enough to see any artifacting. Here's from a test-app of my own:

    [​IMG]

    The stipple-pattern is how it's able to show a smooth, somewhat blending-looking edge, without having to actually use alpha-blending.
     
  9. wireframe

    Veteran

    Joined:
    Jul 14, 2004
    Messages:
    1,347
    Likes Received:
    33
    Very slight difference. 95% of each other.
     
  10. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    Well, then it's obviously not supersampling, but something else that's weird.
     
  11. tEd

    tEd Casual Member
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    2,096
    Likes Received:
    64
    Location:
    switzerland
  12. Ozo

    Ozo
    Newcomer

    Joined:
    Jul 1, 2004
    Messages:
    8
    Likes Received:
    0
    I have seen this "bug" with the ATI OpenGL driver in the past: alpha to-coverage feature only works when multisampling is enabled through the extension itself. I don't know if we can call it a bug or not though.

    Ozo.
     
  13. wireframe

    Veteran

    Joined:
    Jul 14, 2004
    Messages:
    1,347
    Likes Received:
    33
    Is anyone else with Nvidia/ForceWare seeing what I am seeing? The entire scene is somehow anti-aliased (and it looks like the alphas are too, so assuming Super-Sampling) when the control panel is set to "application controlled". I am now seeing what SlmDnk was saying: if I force AA to "off" in the control panel, I lose transparency completely with "alpha to coverage" and the transparent sections become black and "alpha test" looks jagged. A little summary (having problems taking pictures with multiple settings from the same camera position):

    Control Panel setting (77.72) | Output
    Application Controlled
    Alpha test : Whole scene is anti-aliased and alphas look ok
    Alpha to coverage : Whole scene is anti-aliased and alphas become somewhat blurry
    MSAA x4
    Alpha test : Polygons are anti-aliased and alphas look horrible
    Alpha to coverage : Polygons are anti-aliased and alphas look much the same as in "application controlled"
    Off
    Alpha test : No anti-aliasing whatsoever and alphas look horrible
    Alpha to coverage : No anti-aliasing on polygons and alphas lose transparency, becoming the texture (fence) on black
     
  14. Sworkhard

    Newcomer

    Joined:
    Jun 4, 2003
    Messages:
    74
    Likes Received:
    0
    Its definately supersampling on the gforce series. My 5900xt went from 43 fps with application controlled selected in the control panel to 85 fps with 4x anti aliasing and the different became obvious as well when doing this.
     
  15. Sworkhard

    Newcomer

    Joined:
    Jun 4, 2003
    Messages:
    74
    Likes Received:
    0
    Yes, I see exactly what you see. When you checked the frame rates, were you running in full screen. I'm also on the 77.72's
     
  16. wireframe

    Veteran

    Joined:
    Jul 14, 2004
    Messages:
    1,347
    Likes Received:
    33
    Well, I haven't mentioned frame rates yet, but now that I checked I am even more puzzled. With "application controlled" I am in the 200s. With forced "off" I am up to a 1000, MSAA x4 ~ 700, and, get this, 8xS is around 300-400. Using nHancer to force 16xS brings it down to low 100s. I can't seem to force an external setting that matches the frame rate of "application controlled".

    What is going on?

    Oh, full screen, 1024*768
     
  17. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    That's correct behavior. A misbehaving app may be enabling alpha to coverage despite not asking for multisampling, but have this bug undetected. Forcing multisampling could then signficantly change the behavior of application, or break it. So the correct way is to treat applications not asking for multisampling as if they aren't running with multisampling when it's forced in the control panel, so that it's completely transparent to the app.
     
  18. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    Well, if you force it off despite the app asking for it it's not going to work. Alpha-to-coverage needs multisampling to work.
     
  19. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    Done.
     
  20. wireframe

    Veteran

    Joined:
    Jul 14, 2004
    Messages:
    1,347
    Likes Received:
    33
    Alpha blend looks really nice, but I am super-sampling the whole scene for reasons yet to be explained to me.

    Is there any chance you can use alpha textures to cast dynamic shadows? Your famous swinging light in the middle and all that. :D Of course the anti-aliasing would have to affect the shadows.
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...