openrw icon indicating copy to clipboard operation
openrw copied to clipboard

Water is not rendered left and right when looking down

Open madebr opened this issue 5 years ago • 3 comments

When looking down to the water, there is no water rendered at the left and right sides.

screenshot from 2018-09-01 02-47-58

madebr avatar Sep 01 '18 00:09 madebr

I guess it's culling problem.

ghost avatar Sep 01 '18 21:09 ghost

Looks like frustum has one axis?

ghost avatar Sep 06 '18 10:09 ghost

This happens because wave generation in vertex shader moves Z of water surface lower, so perspective projection makes it smaller as it now a bit more far from camera. Line: ws.z = ws.z + (-1.0+(sin(time + (ws.x + ws.y) * waveParams.x)) * waveParams.y); Triangles mesh after transformation: image

alex-leleka avatar Aug 18 '19 11:08 alex-leleka