Two visual mechanisms underlying the behavior of fish