Group Group Group Group Group Group Group Group Group

Ch 20 water ripple effect

In chapter 20 when working on the ripple effect of the water. Once we introduce the ripple values for both the X and Y direction it is done as follows:

float2 rippleX = float2(uv.x + timer, uv.y);
float2 rippleY = float2(-uv.x, uv.y) + timer;

On the rippleY definition shouldn’t the timer variable be added to the uv.y value instead as to the vector as a whole? I tried both ways and it produces the same effect, but I’m not sure why that is.

@bababoega the physics of water ripples are complex and there are many approaches. I suggest trying out a few and choosing the one that suits you best. the one from the chapter was just one version but in the reference document there are links to more resources that might help you.