Your idea and implementation is good I hacked the “water filter” in another direction to create my clone of Riptide GP:
I cant give you the code (no screenshot also because the game is not ready for release yet) but may be some hints and suggestion for optimizing the Water surface and its reflection rendering I did for my implementation:
1- My ski slide on the water surface which made by curve just like a racing road. The surface it also move up and down by sin wave (just like one in JME). End of it are water buoyancy affect back to the ski… So you can see it’s very arbirary and dynamic.
2- The reflection “should” contain few things… I said “should” be cause the things are choosed to be appear in the reflection. Remember that another phase of rendering are trigger on the water surface. So I just have a filter over the geometry list, which geometry is important for player brain, which geometry are in a reflected frustum with limited view range… In my implemetation, the ski and the player ride it should be contained in the reflection, some very close obstable and building are also included. Everything else every except the skybox are excluded.
3- After consider 2 things above. The final things is to render the surface out. The area of water surface which near the player it render it higher resolution. The area far from view render with lower resoltion, and the over 40 meter area has no reflection at all.
4- The soap border effect, at the area near border of water surface are also implemented. But because I don’t have appropriate Z-Buffer as the normal effect (my pool have similar deep every where). The depth value is calculate easily by the distance for the center of the path to that border.
5- First i experiment with the Defered rendering method and I’m currently ported the game to DR. As you can imagine, the problem is quite easier in DR… The concept are the same but quite computation saved because it just render what should be rendered! Then I put lightprobe and refectionprobe along my racing path.
You polygon approach is also quite interesting indeed. It may also help me to solve my soap border problem but not much in optimize the rendered surface… Hope this also help you back.