Best way to draw sea into the horizon 3D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Wallace99

I’m making a 3D game with land generated from a heightmap. I’ve made a water plane using shaders to make it look semi realistic (following a tutorial) and added it to my scene. My question is how do I make it appear to extend into the horizon? Do I need to just scale it really large and increase my view distance? It currently looks like the screenshot below where there’s a gap between where the plane (or my draw distance) ends and where the horizon line begins.

A minor side question too if I may, is it correct to have a water plane the same size as my terrain model? It seems wasted that there’s a tonne of animating water under the ground or will the game engine not have an issue with it? My feeling was to use my height map to make a polygon that fits the troughs instead of one giant plane.

:bust_in_silhouette: Reply From: Wallace99

So turns out scaling the water plane really big and extending the camera’s far distance gave the effect I was looking for. Seems to run fine too so far!

I strongly advise you to split your plane into multiple quads. A graphic card draws a mesh triangle by triangle, and if a triangle is visible, it will be drawn entirely, event if most of it is out of the screen, since it would be too costly to check for every pixel if it is on the screen. As a general rule, we should avoid too large triangles, especially when using expensive shaders.

Joel_127 | 2020-04-03 11:21