O'Reilly logo

OpenGL ES 3.0 Cookbook by Parminder Singh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing the wobble and ripple effect

This is a first simple yet effective vertex shader technique that produces a wobbling effect on the object's geometry. This shader produces animation effects on the geometric shape like a sine wave; this effect is implemented within the vertex shader. This recipe also demonstrates another animation technique that produces a water pond ripple effect.

Getting ready

For this recipe, we will reuse the existing Phong shading recipe from the previous chapter. Rename the shader files with a name of your choice; for this recipe, we will rename these to WobbleVertex.glsl and WobbleFragment.glsl. The wobble and ripple shader are both vertex shader-based recipes.

How to do it...

This section will provide the changes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required