I am following the Nvidia GPU Gems Chapter 1 regarding water simulation using shaders. I am trying to follow the chapter to create an ocean water shader using glsl in OpenGL es 2.0 (iOS).
I am able to create the geometric waves as described in the chapter but when it comes to creating the texture normal map I am having trouble. The chapter is slightly unclear about what is actually getting rendered out to the texture render target. Am I supposed to render a normal map or a height map? In the text it suggests that normals are getting rendered to the target as an rgb color but then again, images (b) and (d) under section 1.3 "Authoring" seem to indicate that a grayscale height map should be rendered to the texture target. The chapter also talks about using a lookup texture for the u coordinate of the texture, but it is unclear to me how this fits in with rendering to the texture. Are there 2 different textures to render to? If anyone can help clarify how these components fit together I would very much appreciate it!