2
\$\begingroup\$

I'm new on graphical programming, and I'm having some trouble understanding the Ocean Shader described on "Effective Water Simulation from Physical Models" from GPU Gems. The source code associated to this article is here.

My problem has been to understand the concept of texture waves. First of all, what is achieved by texture waves? I'm having a hard time trying to figure out it's usefulness.

In the section 1.2.4 of the article, it does say that the waves summed into the texture have the same parametrization as the waves used for vertex positioning. Does it mean that I can't use the texture provided by the source code if I change the parameters of the waves, or add more waves to sum?

And in the section 1.4.1, is said that we can assume that there is no rotation between texture space and world space if the texture coordinates for our normal map are implicit. What does mean that the "normal map are implicit'? And why do I need a rotation between texture and world spaces if the normal map are not implicit?

I would be very grateful for any help on this.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The point of the waves generated in a texture is to use them as normal maps, allowing the appearance of more detail to the waves than would be possible without spending a lot of actual geometry on the water surface.

It's been a while since I did much actual graphics work, but I believe the point regarding the wave parameterization is just mentioned as a convenience -- if you change the vertex wave parameterization you can still use the original to generate the waves in the texture. It won't break the effect, although too much divergence might produce an undesired result. You should try experimenting.

Earlier in the article the author explains that "implicit" texture coordinates are, in this case, referring to texture coordinates that are derived from the vertex position and not passed along explicitly by the CPU side of the pipeline. The implicit texture coordinates are computed by scaling the vertex position so that the vertex position within the water plane is transformed to a [0,1] texture coordinate range, that's all.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .