Strange water when using setNumSamples(2)


On most computers everything is good, graphics is ok and smooth:

One of my friends encounters strange problem with water, its only when he uses AA.

AA is initialized this way:

AppSettings settings = new AppSettings(true);

int numSamples = getContext().getSettings().getSamples();

In the begining fpp is initialized in the following order:

_fpp = new FilterPostProcessor(assetManager);

_water = new WaterFilter(rootNode, _lightDir);
// — some boring water settings —

_shadowR = new DirectionalLightShadowRenderer(assetManager, SHADOWMAP_SIZE, 3);
// — boring shadow settings —

_bloom = new BloomFilter(BloomFilter.GlowMode.Objects);

int numSamples = getContext().getSettings().getSamples();

So, fpp is the last one on viewPort, in fpp first one is the water, second one is bloom.
The scene looks like this:

When I put bloom as first and the water as second, everything looks different, but still wrong:

Again, this so far only one case. He modern graphics card (gtx660m, DX11, genuine nvidia drivers). The problem exists only with AA enabled.

What can I do to fix it?

The second case he described: “looks like the water floats in the sky.”

mhhh weird.
Hard to say what’s going wrong here.
As a workaround you could also provide the user with a fxaa option and use that when there are issues. Not the same quality but it should work.

For the error it seems that the MS framebuffer is not resolved correctly. Water needs to be first for sure, but I can’t tell what’s going wrong in the second shot.

maybe this can help:

I have some sort of optimization. When there is no ‘water tile’ in the scene, the WaterFilter is removed from _fpp. Later, when user moves the map so he can see the water, the WaterFilter is again added to _fpp. Ofc I keep _water as fist on the list.

When there is no water, scene looks correct. There is no strange ‘shadow like’ artifacts of unknown origin, and ofc there is no blue flood on the screen.