Extreme performance drop with dof 2d filter and 16x AA

Performance with standalone player drops to an absurd degree when I put AA samples to 16x. Everything is fine at 2, 4, 8, then 16 will bring an almost empty scene to 20fps, when the same scene plays at 60fps in the embedded player. Blender version 2.77

Edit: performance drop is due to a 2d filter I was using in conjunction with the high AA sampling.

The embedded player does not do AA at at all hence why it runs faster in the embedded player.
And consider that each time you double the AA, it is worse than half the performance (not only more pixels to render, but also the ‘blurring’)

No, you can set multisampling in preferences and it will work in the embedded player. But I didn’t put samples at 16x for the embedded player before I posted(oops). Now I can see it gets the same poor performance as in the standalone when both are at 16x AA. But the performance issue seems to be due to a dof 2d filter I was using. As soon as I toggled the filter off both players were at 60fps with 16x AA.

But it’s weird that that one filter would hurt performance that much.

DOF is quite performance heavy. You have to linearize the depth buffer and do a multisampled blur. You could try using dithering to reduce the performance hit of large radius blur’s.

hmm I wouldn’t know how to do that. I tried playing around with the dithering in the script but don’t see any significant change in performance unless I change the samples and the ring count.

I don’t think I’ll be using the multisample though. Fxaa looks like it has better results with the dof filter at 16x samples.

Just to drop in and suggest the actual reason.

It’s most likely because 2D filters run on every pixel in the game scene. In the standalone player, you probably played the game fullscreen / maximized, but in the embedded player, you might have played with the 3D view in a smaller portion of the screen, meaning less pixels to compute, and a faster result. So if you want to be sure of how your game’s going to run, try running your game with a larger 3D view or in the maximized standalone player every once and again.

Just something to keep in mind.