[SOLVED] WaterFilter Problems in 3.1

Hey Guys,
That’s the current case:
I have code which is working under 3.0 on both mac and windows and tried to port it to 3.1.

On Mac the code works wonderful (except from bullet native), but on Windows I have a strange graphical bug:

Only some GUINodes are drawn (Bitmap Text and Tonegod’s ProgressBars) but not all (Tonegod’s Chat).
The crazy thing is: While the stats are high (as usual), say 150 Texture Switches, I don’t see any textures and have quite some good FPS.

Now I was able to fix that by removing the whole FilterPostProcessor which I use for Basic/AdvancedWaterFilter.

Does that ring someones bell? Is there something known related to that? Maybe some bad behavior of mine which just became inpossible with 3.1?

If not, if it seems like a driver issue/something, what could I look into to narrow it down? Did we by any chance switch to the jogl backend automatically? (Atleast 3.1 comes with a newer jwgl version, right?)

Edit: All the Water Tests run fine and look really beautiful :stuck_out_tongue: I’ll investigate further…

Didn’t hear about that issue before. Is the issue with any filter or only the water filter?
FilterPostProcessing changed in 3.1 in the way the camera is setup. But your issue could have many origin.

Just to confirm, are you using 3.1 alpha1 or 3.1 master?

I could track it down further:
I bypassed the Water Filter (I don’t use others currently), so the issue is the following:
Even when I add just an empty FilterPostProcessor to the Scene, I have that bug. When I remove the FPP, everything looks fine.

Could this be AA related?
Also I am using master (maybe 5-10 commits behind, but those were mainly networking changes etc)

Edit: When I try to build up a test case, it works :confused:
Maybe something related to having two FPPs? (Tonegod, Lemur?), So i should use the first one rather?

What are the two FPPs? You mentioned Lemur so I thought I’d point out that Lemur doesn’t setup a FilterPostProcessor at all.

Hence the Question Mark. I didn’t know whether it does or if it’s a problem at all.
The only thing that could/should be different from a testcase is my GUI setup (Viewport-Wise), so I thought it could be an issue in a way that you only should have one FPP at all and add all filters to it.

But when Lemur isn’t adding a FPP, Tonegod could still.
I have to check another thing though, I remember setting the AA-Samples hardcoded due to something (but I can’t recall what).

The FPP needs the AA setting hardcoded into it. It doesn’t pick the one you set in the settings.

Well, “hard coded” based on what is in AppSettings, most likely. The point is that your app has to set it.

Heureka :slight_smile: I have a Test-Case!

Simply adding two FPPs to the same viewPort in simpleInitApp().
The Setting of the Samples is irrelevant here, neither “both=4”, “both=1”, different values, do change a thing.

I guess one shouldn’t use two FPPs at all, but out of lazyness I had one (or more) fpps, one for each WaterFilter and afterwards I’d add another FPP just to do the AA.

I will change my code, ofcourse, but I guess that is still a bug. Let’s see if you encounter it aswell, and also: Why it didn’t appear on Mac :open_mouth:

Well… you should never ever have 2 FPPS…

Edit: And if a GUI lib is adding one without you knowing it it’s utterly wrong

Then I wonder why it worked so good on 3.0 and 3.1 mac :stuck_out_tongue:
But you are right, I’ll have to change my design.

Also: I don’t know if they did, I just thought of it being a possibility, but it isn’t it seems.

I guess the Filters are applied from top to bottom? And AA is automatically applied at the end?

First to last.

re: AA, no, AA is applied at render time… ie: not “post” but “actual”. That’s why you have to set the sample rate of the FPP or all of your lovely scene AA gets completely wiped away.

Edit: added a very important comma though I think the gist of what I was saying was still clear.

2 Likes