FilterPostProcessor and water. possible bug?

im tring to create water usinf a FilterPostProcessor object.

but i have an issue, here is an screendhot:

and my code:
[java]private void cargarAgua2(){
DirectionalLight sol = new DirectionalLight();
Vector3f luzDir = new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f);
sol.setDirection(luzDir);
sol.setColor(ColorRGBA.White.clone().multLocal(2));
sceneModel.addLight(sol);
FilterPostProcessor filtroPos = new FilterPostProcessor(assetManager);
WaterFilter agua = new WaterFilter(terrain, luzDir);
agua.setWaterHeight(-6);
agua.setUseFoam(false);
agua.setUseRipples(false);
agua.setDeepWaterColor(ColorRGBA.Brown);
agua.setWaterColor(ColorRGBA.Brown.mult(ColorRGBA.Green));
agua.setWaterTransparency(0.2f);
agua.setMaxAmplitude(0.3f);
agua.setWaveScale(.008f);
agua.setSpeed(0.1f);
agua.setShoreHardness(1.0f);
agua.setRefractionConstant(0.2f);
agua.setShininess(0.3f);
agua.setSunScale(1.0f);
agua.setColorExtinction(new Vector3f(10.0f, 20.0f, 30.0f));
filtroPos.addFilter(agua);
viewPort.addProcessor(filtroPos);
}[/java]
in the edge of the screen there are transparent-black stains.
if i set “//water.setSpeed(.03f);” en cero , the stains disappear. but if i set more speed, the stains move faster.

I hope someone can help me.

I’ll look into it.

is a bug?

yes it looks like.

I fixed it, but for some reason I cannot commit the fix to the repo right now (some unavailable error). I’ll commit as soon as possible and I’ll report back

@nehon: I can’t see the screenshot so I made my own.

Is this the same issue?

edit:

here’s a better screenshot:

nope that’s not the same issue.

That’s strange it looks like you have a multisampled image but that the resolution is done like it’s single sampled…
Do you use the stock Filter?

If you zoom in to the areas does the white disappear? if so try add extra pixel borders to the outside of the UV’s in the DiffuseMap or check your magnification/minifaction attributes

@nehon: I don’t know about the stock filter. I’m using the water filter in a FilterPostProcessor. Also I saw the issue in “TestPostWater” in the jme3-project (see the first screenshot).

@wezrule: No it just got “finer”.

I’ve attached a video. You’ll need to set the video to the highest quality. Otherwise it will not the visible. Look at the sails of the ship in the middle of the screen.

[video]http://youtu.be/N9sekuMwg3k[/video]

I fear this could be a driver issue because it worked on my notebook with a 620m but I got the same error on another pc with the same gpu. Updating the driver didn’t solved it.

Okay, I cannot describe how strange the last 30 minutes were. I played around with the fragment-shader files of the water filter, edited a little bit and reverted them to the last version from the jme3-repository.

And then, boom!, the bug was gone. There’s no change in any file. I’ve rebuild the whole engine and the game from scratch and the bug is gone. Damn I’ve reinstalled my whole gpu driver. Twice. And that didn’t do anything.

Sorry for the cursing but… What the fuck was that?

If this issue returns I’ll report it. For now I’m just confused and tired.

As I said it looks like you use anti aliasing. The water filter does something special for antialiasing or else…you basically have this issue.
The thing is only the water15.frag handles anti-aliasing, and not the water.frag. Maybe you have a computer that doesn’t support glsl1.5 (opengl 3.2) so the 1.0 shader is picked.
as a workaround to this, I would recommend using FXAA (even if you have o put it twice in the filter stack). It will be a lot faster than multi sampling with the water filter.

@nehon: Good to know. Thanks for your help. : )

@eypidemik
it’s fixed and committed to last SVN, could you test?

thank you very much, i will test it tomorrow, now i go to sleep.
really thank you. good support to solve issues, I have chosen the correct motor.

how can i download this actualization? im working with jme3 sdk binary for windows.

a month ago i downloaded it from here:
http://hub.jmonkeyengine.org/downloads/?did=1

In the menu above Downloads/Nightly Builds
http://jmonkeyengine.com/nightly/

excuse my absence i tested it, but the problem still. and the water reflection is working strange.

this is an image:

and my code:
private void cargarAgua2(){
Vector3f luzDir = new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f);
fpp = new FilterPostProcessor(assetManager);
WaterFilter agua = new WaterFilter(terrain, luzDir);
agua.setWaterHeight(-5.2f);
agua.setUseFoam(false);
agua.setUseRipples(false);
agua.setDeepWaterColor(ColorRGBA.Brown);
agua.setWaterColor(ColorRGBA.Brown.mult(ColorRGBA.Green));
agua.setWaterTransparency(0.2f);
agua.setMaxAmplitude(0.3f);
agua.setWaveScale(0.008f);
agua.setSpeed(.03f);
agua.setShoreHardness(1.0f);
agua.setRefractionConstant(0.2f);
agua.setShininess(0.3f);
agua.setSunScale(1.0f);
agua.setColorExtinction(new Vector3f(10.0f, 20.0f, 30.0f));
fpp.addFilter(agua);
viewPort.addProcessor(fpp);
}

if i put :
agua.setMaxAmplitude(0f);
agua.setWaveScale(.0f);
agua.setSpeed(0f);

all work fine but whitount wabes.

Protips:

1 - To make a proper screenshot hit ALT-PRT_SCR (or whatever name it has on your keyboard) to get a screenshot of the window that has the focus. You won’t have to crop.
2 - Use the JAVA CODE TAGS. This makes the code 10 billion times easier to read and won’t put a LOT of people off.

sorry, forget the java tags, and thanks for the recomendation for the screenshots