New Alpha to coverage demo

tEd said:
Alpha test - 6xAA

at1.png

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.
 
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!
 
wireframe said:
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?

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.
 
wireframe said:
2. I am curious why your demos seem to be v-synced. My drivers are set to "application controlled," but in the case of many (most? all?) of your demos I must force v-sync off. Is this something you are doing or is ForceWare likely to blame? (I do have my suspicions that FW handle v-sync incorrectly at times, but it puzzles me why Nvidia would not have fixed this immediately as it absolutely kills performance, especially for benchmarks).

Again, cheers and keep up the good and interesting work.

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.
 
Xmas said:
I have no clue why noone ever used this featue (well, besides not being available in DirectX).

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.
 
Humus said:
wireframe said:
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?

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.

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).
 
How's the performance? Is MSAA and "application controlled" running at very difference fps?
 
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:



The stipple-pattern is how it's able to show a smooth, somewhat blending-looking edge, without having to actually use alpha-blending.
 
wireframe said:
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).

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.
 
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
 
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.
 
wireframe said:
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

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
 
Sworkhard said:
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

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
 
Ozo said:
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.

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.
 
wireframe said:
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.

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.
 
Humus said:
Chalnoth said:
Btw, Humus, it might be nice to add a mode with alpha blending.

Done.

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.
 
Back
Top