Filters break multisamples

I don’t understand.
I mean if you’ll use a filter for antialiasing and filters don’t support antialiasing, you won’t get antialiasing in the end anyway, so it doesn’t look like a solution.

That kind of antialiasing is implemented in a postprocessing shader and does not require multisampling, which is what is not supported in postprocessing filters at the moment.

I tried a FXAA filter (from here: [filters and multisamples)). To me it doesn’t look as good, but I could say more surely if I could use CommonFilters (cartoon inking) and a custom filter (FXAA) at the same time.
I don’t know how:

# common, cartoon inking
filters = CommonFilters(base.win, base.cam)
filters.setCartoonInk()

# custom, FXAA
filter_man = FilterManager(base.win, base.cam)
my_map = Texture()
final_quad = filter_man.renderSceneInto(colortex = my_map)
final_quad.setShader(loader.loadShader("fxaa.cg"))
final_quad.setShaderInput("color", my_map)
final_quad.setShaderInput("active", 1)
  File "C:\Users\DK\Desktop\dev\src\test.py", line 12, in <module>
    filter_man = FilterManager(base.win, base.cam)
  File "C:\Panda3D-1.8.0\direct\filter\FilterManager.py", line 57, in __init__
    self.notify.error('Could not find appropriate DisplayRegion to filter')
  File "C:\Panda3D-1.8.0\direct\directnotify\Notifier.py", line 132, in error
    raise exception(errorString)
StandardError: Could not find appropriate DisplayRegion to filter

Also, FXAA seems to be considered an advanced shader effect by Panda, which might not work for some users.

Another thing I noticed today: why does ShaderGenerator affect the cartoon ink filter so much?

You can’t have two FilterManagers on the same window. You’ll need to use the same object for both filters. You can get access to the underlying FilterManager object through CommonFilters - it might be easiest for you to inherit from CommonFilters. You’ll probably need to look at the source code of CommonFilters.py for the exact how and what.

I don’t know if this was caused when attempting to fix the issue here, but in 1.8.0 resizing the window seems to mess up the filters.

Also you can’t change background color when using filters.