- Home /
Anti Aliasing and Sprites on Intel HD Graphics
Hi,
My game consists mostly of sprites, and has a few 3D objects. I turn anti-aliasing on for the 3D objects, so they don't look jagged. Works wonderful with proper GPUs.
My problem is with Intel HD graphics, the anti aliasing kills performance. I'm not sure why, because there's only 3-4 3D objects, and as far as I understand, anti aliasing isn't supposed to work on sprites anyway. I can confirm it has no effect on the sprites when it's on or off, however when the sprites are there performance is horrible. If I disable the sprites, anti aliasing performance is back to normal.
Any idea why this is happening? Any other ideas on how I can integrate anti aliasing into the 3D objects only? They have custom shaders, but I didn't find a way to add anti aliasing to a shader.
This seems to happen mostly with these sprites:
Edit: Adding a profiler snapshot:
You can search for anti-aliasing on the asset store.
I tried post effect anti aliasing and it was pretty bad.
Does this also happen in a finished build? I've had alot of performance issues in the Unity Editor that simply do not occur in a finished build, try it out to see if it works as intended in your target build.
And you have tested both unity built in $$anonymous$$SAA and the Standard Assets Antialiasing script with multiple AA methods like FXAA?
I tried the post process AAs from the standard assets, the results were pretty bad. We use a toon shader and the post effect AA doesn't work so well on the thin outlines, while the hardware $$anonymous$$SAA does a great job.
Well, if the $$anonymous$$SAA works fine then I'd suggest using that only. The problem you're having with the scripts may lay in their code, try snooping around in it to see if there is some special code for sprites. Also in your profiler it's the Gfx.WaitForPresent that is delaying the rendering, try disabling Vsync if it's enabled.
The problem with $$anonymous$$SAA is that is uses lots of bandwidth (https://en.wikipedia.org/wiki/$$anonymous$$ultisample_anti-aliasing). Integrated GPU uses the same memory as the CPU and then have less bandwidth than dedicated GPU. Try proposing different AA options to the player, or to use smaller resolution on some GPUs.
To be sure the bandwidth is the problem: try launching the game in a smaller resolution, like 640x480. If the game runs faster, even with AA, that's a bandwidth problem.