This discussion may contain spoilers!
When fiddling around with the machinery in the lab while trying to get a certain toy, Sam clearly altered with future events. See that to get the toy, he had to choose the option where a vision showed a giant Max eating him.
Just puzzle stuff? Try seeing Sam's future in the final battle. He dies inside of Max's mouth, it's pretty horrifying.
Well done, Sam.