As the water begins to get shallower, water movement is slowed by friction against the bottom. The waves are slowed down and pushed together. That makes each wave steeper, especially on its front side. As the water gets shallower, the waves get steeper and steeper until they fall over and break on the front side.
Furthermore, odds are that when you do see a chameleon change its color, it’s probably trying to broadcast its mood rather than evade predators. Nevertheless, the animal kingdom is filled with amazing color-changers, several of which dramatically outdo the chameleon clan in the skill of rapid-fire camouflage.