Apply antialiasing in certain area of the screen

Hi guys,

I’m trying to figure out how to apply antialiasing in certain areas of the screen.
For example, if I have a star-shaped mask, how can I apply antialiasing in only that star-shaped area?


Multisample antialiasing cannot be done on an arbitrary section of an image. A multisample resolve operation resolves the whole image (or at least, a rectangle of it).

However, pseudo-antialiasing techniques like FXAA and the like can be made to work over an arbitrary area. You’d just use a stencil mask to prevent writes to the areas you don’t want “antialiased”.