I'm looking for some pointers on how to implement simple water surface effects in OpenGL ES 2.0. Nothing fancy like reflection or refraction, just a basic ripple/wave effect that modulates over time. Performance is critical. I'm assuming this will be best done in a shader.
Any pointers on how to best handle this?
In GLSL, you apply modifiers (qualifiers) to a global shader variable declaration to give that variable a specific behavior in your shaders. In HLSL, you don't need these modifiers because you define the flow of the shader with the arguments that you pass to your shader and that you return from your shader.
About GLSL These shading languages are used to program shaders (i.e. more or less small programs) that are executed on a GPU (graphics processing unit), i.e. the processor of the graphics system of a computer – as opposed to the CPU (central processing unit) of a computer.
The short version is: OpenGL is an API for rendering graphics, while GLSL (which stands for GL shading language) is a language that gives programmers the ability to modify pipeline shaders. To put it another way, GLSL is a (small) part of the overall OpenGL framework.
Adrian Boeing's blog has example GL code, accompanied by clear explanations, for a number of effects including ripple.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With