-
Notifications
You must be signed in to change notification settings - Fork 325
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
Labels
Comments
Closed
All quality levels have the high-quality water shader now. Closing. |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: