Temporal anti aliasing (and other temporal algorithms) work by matching pixels this frame with pixels from the last frame and then using that information.
I get that you can use the last and current frame matrices along with motion vector information to match the pixels between frames.
What I don't get though is how do you know whether the reprojected pixel is valid or not? For instance the old pixel may now be hidden behind a different object.
Is it by color only? If so, how are animated textures or changing light conditions handled?