Alpha to coverage support added to OGRE

OGRE

With only a couple of days to go before the feature lock-down of Ogre 1.6, in time for a release candidate next week, I decided to squeeze in one more feature of my own - Alpha to Coverage support. This allows the use of Multi-sample Anti-aliasing (MSAA) on transparent texture edges as well as the more usual polygon edges.

It headlines as a Dx10 feature, but in fact both ATI and NVIDIA have exposed it on GL and on Dx9, the latter via some nasty ‘magic’ state hacks since Dx9’s API doesn’t include it. They weren’t as nasty as I thought though, and since someone raised it in the forum recently, plus the fact that I’d been manually turning it on in the NVIDIA control panel for OgreSpeedTree, I figured I might as well add proper support for it.

In the image (if you click to get the full-size version), you can probably tell that the leaf on the right has alpha to coverage enabled, and the one on the left doesn’t - the right-hand one looks nicer, obviously. It does have an overhead of course, but those with decent cards will appreciate the extra quality I’m sure, and you can enable it on a per-pass basis in your materials to target it where you need it, which is better than enabling it across the board in the control panel like I was doing before. I’ve tested it on Dx9 and OpenGL on my GeForce 9800, and my Radeon HD 2900 (I guess I could update that, but it’s only a test box after all!) and it works nicely.

Yet another reason to upgrade to Ogre 1.6 :)

Share this post: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • N4G
  • StumbleUpon
  • del.icio.us
  • Mixx
  • Google
  • blogmarks
  • Slashdot
  • Reddit

9 Responses to “Alpha to coverage support added to OGRE”

  1. Kevin Says:
    August 24th, 2008 at 2:13 pm

    Steve, just FYI and not critical. The HEAD needs an update to OgreCEGUIRenderer.cpp to account for a new parameter due to this feature.

  2. Steve Says:
    August 24th, 2008 at 2:21 pm

    Just spotted that - fixed, thanks :)

  3. kinjalkishor Says:
    August 25th, 2008 at 3:34 pm

    PSSM and AlpaToCoverage are really 2 great last time aditions. Make me wanting it more. Really AlphaToCoverage enhances Image Quality greatly for well Leaf, forest, tree rendering. PSSM is again most wanted great quality is to performance ratio feature.

    I cannot wait for 1.6 RC1.

    I am so bored of Vista Theme Colors that I am making 510 my own themes having Parrot green, skyBlue, MSOffice BLue, etc. and some good colours with Highly tued Colour Combos. This is a case where again Vista needs lots of intervention from user to be enjoyable. XP is so rich on themes. Already its default theme is so beautiful.

    Does anyone knows of a WinXP Luna theme for Vista and How to change the colour of Taskbar from black Completely. By changing in Aero setting panel Blackness remains and we donot get pure colour. I want complte rich colour change like XP taskbar.?
    I bought Assasin Creed thinking it was a boring combo of Hitman and POP, but it Ultimate Fun game to play. Now that is gameplay. I really liked in first 5 minutes. It crashes on DX10 in Vista 64 bit, play with Dx9 exe, if anyone has problems on PC.

  4. kinjalkishor Says:
    August 25th, 2008 at 3:48 pm

    Now after palying Assasins Creed I am bound to believe that We need more and more cultural content in games. Though I dont see any indian Mythological Content coming soon in say Gears of Rama or Age of Avatars or something like that. Though Indian Mythological content is already very rich. I though prefer more mixed content. In the same way as Lord of the Rings take influences from mythologies of all over Europe. The big reason I decided to mix Indian mythology with Western Mythology for my novel, It looked so intersting concept.
    Back to point there is too much americanism, Altair, POP as noted by Sinbad himself. It certainly kills immersion somewhat.
    It is becoming more like movies, say The last samurai, as it focusses more on transition of an american to samurai ways.

  5. kinjalkishor Says:
    August 25th, 2008 at 3:53 pm

    Interactive Raytracing combining Rasterization by CUDA at Sigraph. Nvidia certainly tracks what John Carmak says.

  6. Steve Says:
    August 25th, 2008 at 4:01 pm

    Erm - try to stay on topic please….

  7. Dan Says:
    August 25th, 2008 at 8:08 pm

    @Steve: Nice work on AlphaToCoverage. You made doing it sound so easy. :)

    @kinjalkishor: When referring to older topics, try going back to some of Steve’s older posts and commenting there. Just a thought. :)

  8. kinjalkishor Says:
    August 27th, 2008 at 10:06 am

    I will take care next, thme pack may be a offtopic, but I took this topic as related to OGRE1.6 features as related to game development. Erm

  9. fengwei Says:
    September 2nd, 2008 at 9:20 am

    Steve,nice work ,
    could you send me one ogrespeedtree.
    thanks very much.

Leave a Reply