I follow the Nvidia GPU Gems Chapter 1 regarding modeling water using shaders. I am trying to follow this chapter to create an ocean water shader using glsl in OpenGL es 2.0 (iOS).
I can create geometric waves as described in the chapter, but when it comes to creating a normal texture map, I have problems. The chapter is a bit unclear about what actually gets rendered for the texture rendering object. Should I display a normal map or elevation map? The text assumes that the normals are obtained for the target as the rgb color, but again, the images (b) and (d) in section 1.3 “Creation” seem to indicate that the gray height map should be mapped to the target textures, The chapter also talks about using the search texture for the u coordinate of the texture, but I don’t understand how it fits into the texture render. Are there two different textures? If someone can help clarify how these components fit together, I would really appreciate it!
source share