Page 1 of 1

What are valid FSAA values?

Posted: Fri Jun 14, 2013 3:42 am
by Jasoco
Been playing around with FSAA in my 3D game project. Makes the jaggie polygons look nice and smooth. So I put a setting in for people to set it manually. But when I set it to 1, 2 or 3 it gives me an "error" in the console that says: "Warning, quality setting failed! (Result: buffers: 1, samples: 4)" Also at 5, 6 and 7 it says "samples: 8". So I guess it can be 0, 4 or 8? What are the valid values for FSAA?

Re: What are valid FSAA values?

Posted: Fri Jun 14, 2013 9:51 am
by SimonLarsen
1, 2, 4, 8 and 16 work for me. 32 does not.
Are you sure 2 buffers gives an error?

Re: What are valid FSAA values?

Posted: Fri Jun 14, 2013 12:10 pm
by slime
Yes, the most frequently supported FSAA values are 2, 4, 8, and 16. Values which are valid on one system may not be on another: in OS X my AMD 6750 supports 2, 4, and 8x, but my Intel HD 3000 only supports 4x.
I believe in general the driver will round up if you try to use an unsupported value that's lower than the maximum.

Re: What are valid FSAA values?

Posted: Fri Jun 14, 2013 9:07 pm
by Jasoco
SimonLarsen wrote:1, 2, 4, 8 and 16 work for me. 32 does not.
Are you sure 2 buffers gives an error?
I was surprised too. Yes, 2 gives the error. 4 and 8 do not. It's an Intel HD 4000. I haven't tried passed 8.

I just want to create a user frontend for setting this and need to know what the values I should put in the list are.

Or maybe I should just use an ON/OFF toggle instead of a value and just pass 1 or something when it's on. Do higher values in Löve even make a difference on higher graphics cards?

Re: What are valid FSAA values?

Posted: Sat Jun 15, 2013 12:31 am
by Boolsheet
OpenGL specifies this sample number as the number of samples used by the multisampling anti-aliasing, but is otherwise implementation-dependent. That means there's no way of knowing what the graphics driver supports unless you start collecting data on every card or there's some vendor specific API that can be accessed. We have seen that they are supporting power-of-two sample numbers, probably because it's easier to implement.

In my opinion, with 4 samples you already have good anti-aliasing and everything above is adding only a little more to the quality. This can of course vary with whatever is drawn.

A value of 1 should be the same as if it is disabled. You may want to give the user the option to test 2, 4, 8 samples and then give them a feedback if it worked. The value return by love.graphics.getMode should be the one that's active.

Re: What are valid FSAA values?

Posted: Sat Jun 15, 2013 5:05 am
by Jasoco
Okay. On my machine the only proper values are 0, 4 and 8. Anything else rounds to the closest active value.

I'll probably just have on/off.