Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Water is not rendered left and right when looking down #623

Open
madebr opened this issue Sep 1, 2018 · 3 comments
Open

Water is not rendered left and right when looking down #623

madebr opened this issue Sep 1, 2018 · 3 comments

Comments

@madebr
Copy link
Contributor

madebr commented Sep 1, 2018

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

@ghost
Copy link

ghost commented Sep 1, 2018

I guess it's culling problem.

@ghost ghost added bug graphics labels Sep 2, 2018
@ghost
Copy link

ghost commented Sep 6, 2018

Looks like frustum has one axis?

@alex-leleka
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants