# How does this SSAA look?

This topic is 1755 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been developing a brand new set of shaders that can accept both traditional and physically based parameters. I'm testing a lot without diffuse textures to see how the lighting looks, so only rendering with a normal map and a gray texture for diffuse map. And a AO map.

http://dl.dropboxusercontent.com/u/45638513/rs05.png

So I decided to implement as an experiment full lighting shader surface super-sampling antialiasing solution. Obviously, since this is surface supersampling, post-processing AA like FXAA/SMAA is not needed and neither is Toksvig AA or any other specular AA solution. But geometry borders are not affected by surface supersampling, so for best results traditional MSAA should be used.

Here is the same shot with ridiculously high SSAA:

http://dl.dropboxusercontent.com/u/45638513/rs06.png

For real games something like this might work on dual Titans or whatnot, but average consumer level GPU will tank.

Here is a more normal example: Before:

http://dl.dropboxusercontent.com/u/45638513/rs07.png

After, with SSAA 4x:

http://dl.dropboxusercontent.com/u/45638513/rs08.png

For these screenshots I did not SSAA the AO map. I did implement this later but found that there is almost zero difference, so I wouldn't recommend it.

As said before, SSAA does not need specularity AA. Before with diffuse:

http://dl.dropboxusercontent.com/u/45638513/rs09.png

After:

http://dl.dropboxusercontent.com/u/45638513/rs10.png

Closeup before: http://dl.dropboxusercontent.com/u/45638513/rs11.png

Closeup after: http://dl.dropboxusercontent.com/u/45638513/rs12.png

Closeup after with SMAA: http://dl.dropboxusercontent.com/u/45638513/rs13.png

I'll do some heavy duty tests with a batch count of about 2500 and no instancing comparing no AA with only SSAA 4x to see if this is doable in real time.

##### Share on other sites

Not sure if I understand the question, but I think 4xSSAA looks fine/ for sure acceptable

##### Share on other sites

Not sure if I understand the question, but I think 4xSSAA looks fine/ for sure acceptable

Well, the questions:

1. How does it look obviously. With supersampling there is the danger of high frequency detail to be lost or made to soft.

2.Why is the aliasing so bad with this texture. Is the texture too high contrast or am I doing something wrong. Could someone test the Slate Tile found in https://dl.dropboxusercontent.com/u/69879086/Blog/PBR_blog.zip and see if those textures are prone to aliasing? Especially the normal map.

3. Can this be done in real time on good but not great hardware? This is a question for me to answer. This is where the 2500 batch count scene comes in, giving some rough performance numbers. I need to find out the cost of 3x-11x SSAA and see how many objects can be rendered with it? I also need to figure out the best way to tune it. SSAA can be done on each component. Doing it on env mapped objects will probably not be possible.

##### Share on other sites

If you want to benchmark, you can compile a 'special' version of your test (running automatically) and writing some usefull data to a log file (i.e. rendered frames, frame times, nr. of triangles). I can then run it to give input.

That way you know performance on my machine with 'medium' specs, I5 2320, GTX660 2GB (EVGA).

Maybe someone else can do the same on his I7 with GTX780 or something

That way you could compare the logs.

Edited by cozzie

##### Share on other sites

If you want to benchmark, you can compile a 'special' version of your test (running automatically) and writing some usefull data to a log file (i.e. rendered frames, frame times, nr. of triangles). I can then run it to give input.

That way you know performance on my machine with 'medium' specs, I5 2320, GTX660 2GB (EVGA).
Maybe someone else can do the same on his I7 with GTX780 or something :)

That way you could compare the logs.

I don't know if I'd be any help but I'm also willing to run it on my PC and post the results here. :)

i7 2600k @ 3.4 GHZ
XFX HD 7850 2GB DD OC
16GB of 1600MHZ Ram

##### Share on other sites

If you want to benchmark, you can compile a 'special' version of your test (running automatically) and writing some usefull data to a log file (i.e. rendered frames, frame times, nr. of triangles). I can then run it to give input.

That way you know performance on my machine with 'medium' specs, I5 2320, GTX660 2GB (EVGA).
Maybe someone else can do the same on his I7 with GTX780 or something

That way you could compare the logs.

I don't know if I'd be any help but I'm also willing to run it on my PC and post the results here.

i7 2600k @ 3.4 GHZ
XFX HD 7850 2GB DD OC
16GB of 1600MHZ Ram

If you can help in testing you could be run my ram set small benchmark

https://www.dropbox.com/s/d0epr8d1drsa4bs/ramset.zip

and say how your result is... (no maloware just set of 1mb ram to zero)

##### Share on other sites

OK, thanks!

I'll prepare a bench-marker.

Just give a few days to finish the shaders and make sure the gold material does not go into a hissy fit with extra diffuse lights on top of it:

As for the "ramset", it stats off with an average of about 120000 but eventually it goes up to 190000. It must be caching.

##### Share on other sites

Holly shit, I need to optimize the hell out of these shaders. I did manage to squeeze in 4 lights in one pass, but with 4x SSAA, fxc reports this about rendering dielectrics:

// approximately 481 instruction slots used (12 texture, 469 arithmetic)

And for metallic objects:

// approximately 628 instruction slots used (16 texture, 612 arithmetic)

BTW, there is no need for two different shaders, one can handle metallic and dielectric, but because of the performance difference I decided to split them up.

Just as an experiment I did squeeze in the "traditional" 8 lights in one pass, and metallic objects with 4x SSAA use 1132 instructions.

This is going to be one hardcore bench-marking endeavor. I also need to develop a middle-ground between no SSAA and 4x SSAA.

##### Share on other sites

If you can help in testing you could be run my ram set small benchmark

https://www.dropbox.com/s/d0epr8d1drsa4bs/ramset.zip

and say how your result is... (no maloware just set of 1mb ram to zero)

As soon as I started it up, it was in the range of 190,000 - ~200,000.  And after a little bit, this showed up:

OK, thanks!

I'll prepare a bench-marker.

Cool! And no problemo dude.  Happy to help.

Edited by KoldGames

##### Share on other sites

OK, as soon as it's ready to go let us know

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634134
• Total Posts
3015742
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!