My Words : GL_SAMPLE_ALPHA_TO_COVERAGE_ARB doesnot need sorting objects from farthest to closer!!!!! and it make edges looks like GL_BLEND that is much better than GL_ALPHA_TEST. Forum did someone interest? did someone can implement that feature?
http://www.humus.name/?page=3D&ID=61
One of the weaknesses of multisampling compared to supersampling is that it doesn't work too well with alpha testing, a technique that unfortunately many games still use as a replacement for real geometry. The effect is that the edges created by alpha testing aren't antialiased. The proper solution is of course to alphablend, but that means the transparent or masked objects need to be sorted in a back to front order, which can be costly and inconvenient. But there's another solution that doesn't need depth sorting and properly antialiases alpha masked surfaces, namely alpha-to-coverage. This works by sampling the alpha and interpret it as how much it covers the pixel, and then the result is dithered and distributed to an approriate number of multisample samples. So if you're using 6x multisampling and the incoming fragment's alpha is 0.5 it will be deemed to cover three samples, which will then receive the fragment data. When the multisample buffer is resolved this means it will be blended with the background which will be written to the remaining samples. It is a bit of a hack but actually works very well in practice. In fact, it often works better than supersampling, since it's using the alpha value directly rather than checking against a number of thresholded alpha values, and thus doesn't have the flicker and discontinuity problem that often occurs even with supersampling when the texture is minified a couple of mipmap levels. When magnifying the texture it results in blurrier edges though, which is also the case with alpha blending. To solve that problem this demo also implement a technique that boosts the alpha contrast around 0.5 when the texture is magnified so that the [0, 1] range of alpha values spans over the width of a pixel. To figure out how much the texture is magnified another texture is looked up with a texture coordinate that's multiplied with the size of the base texture. Each mipmap level contains the size of that mipmap level. So if the texel of the base texture is 20 pixels wide in screenspace, contrast is boosted 20x. This makes the edges equally sharp as with alpha testing, but the look properly antialiased.
To compare the results to alpha testing you can toggle between the two methods on the F1 menu.
GL_SAMPLE_ALPHA_TO_COVERAGE_ARB
Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]
Moderator: Graf Zahl
- RaVeN
- Posts: 45
- Joined: Fri Nov 06, 2009 12:21
- Location: Ukraine
- Contact:
Jump to
- DRD Team
- ↳ News
- ↳ General
- ↳ Projects
- ↳ Releases
- ↳ Reviews
- ↳ Editing Help
- ↳ Off-Topic
- ↳ GZDoom 4.8.0 ARM Download
- ↳ GZDoom 4.8.0(a) ARM Download
- ↳ GZDoom 4.8.0(b) ARM Download
- Hosted Sites
- ↳ Development Builds
- ↳ News
- ↳ Doom Nexus
- ↳ News
- ↳ Persecution Complex
- ↳ Public Forums
- ↳ Bug Reports & Suggestions
- ↳ Resolved Feedback
- ↳ Paranoiac
- ↳ Public Forums
- ↳ Bug Reports & Suggestions
- ↳ Resolved Feedback
- ↳ Parallax
- ↳ Maps
- ↳ Models
- ↳ Dr. Nostromo's Place [Hacx/Vassal Projects]
- ↳ General Chat
- ↳ Hacx Project
- ↳ Hacx General Discussion
- ↳ Hacx Development
- ↳ To Be King Project
- ↳ To Be King General Chat
- ↳ To Be King Development
- ↳ ECWolf
- ↳ Releases
- ↳ Risen 3D
- ↳ Stronghold
- ↳ Hostee Archives
- ↳ Bio's Site-Place
- ↳ From Bio's Desk
- ↳ Bio-Waste
- ↳ Bugs
- ↳ Cold Hard Cash 2
- ↳ GrubberSoft
- ↳ News
- ↳ TheDarkArchon's Haunt
- ↳ News
- ↳ Mod Journal
- ↳ Doom Armory
- ↳ Weapon Modding Help & Resources
- ↳ Development Journals
- ↳ Releases
- ↳ Paul's Bag of Stuff
- ↳ Site
- ↳ News
- ↳ Works
- ↳ Art
- ↳ Music
- ↳ Games
- ↳ TGRDM3
- ↳ Maps
- ↳ Feature Requests
- ↳ Closed Feature Requests
- ↳ Bugs
- ↳ Closed Bugs
- ↳ GZDoom
- ↳ News
- ↳ Bugs (Archive)
- ↳ Vexing Bugs
- ↳ Closed Bugs
- ↳ Technical Support
- ↳ Closed Tech Issues
- ↳ Code Submissions
- ↳ Closed Feature Suggestions
- ↳ QZDoom
- ↳ News
- ↳ Bugs
- ↳ Bugs (Archive)
- ↳ Closed Bugs
- ↳ Suggestions
- ↳ Code Submissions
- ↳ Closed Suggestions
- ↳ Experimental Builds
- ↳ Archive
- ↳ Merged Changes
- ↳ Community Builds
- ↳ File Sharing Site