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

Low-quality water shader #57

Closed
lmoureaux opened this issue Jan 22, 2017 · 1 comment
Closed

Low-quality water shader #57

lmoureaux opened this issue Jan 22, 2017 · 1 comment

Comments

@lmoureaux
Copy link
Contributor

There is a water shader at high quality, but it is disabled at lower qualities. Add a better fallback than just... nothing.

Idea

Use a normal map of waves, two uniform vec2 a and b, one varying vec2 uv. In the pixel shader, fetch the texture at uv + a and uv + b. Use the mean of the two as normal vector. Animate a and b in JS (rotate and scale).
To avoid repetitions in space, one may consider adding some low-frequency, low-intensity noise (with non-integer wavelength). Repetitions in time can be avoided by tuning the JS animation.

I think GPU gems has a water shader, might be worth looking at.

@ghost
Copy link

ghost commented Oct 22, 2017

All quality levels have the high-quality water shader now. Closing.

@ghost ghost closed this as completed Oct 22, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant