Using refraction in a body of water
Water is one of the most cherished materials in real-time visualizations, as shown by the continuous advances made to the materials that have tried to depict it over the years. We’ve come a long way from the days of early 3D graphics when simple planes and animated textures were used to represent it. Even though we can still use those older tricks, thankfully, we have more techniques at our disposal that can help us achieve richer results. Things such as refraction, displacement maps, tessellation, and caustics can add a bit of extra flair to our projects, and we are going to be looking at that first effect in this recipe.
Getting ready
More so than in previous recipes, this one will require us to set up the scene in a way that allows the effects that we are about to implement to shine. The first thing we’ll need is a plane onto which we can apply the water material we’ll be creating. Beyond that, we’ll also need...