The sensor doesn't know or care where a photon comes from. If one hits with enough energy, the sensor reacts. Same with a piece of photographic film.

The directions from which photons may come depends on the physical arrangement and the optics. A film camera directs light from only a relatively narrow field of view onto the film. The FOV striking an individual film grain is, by design, very narrow. Lower FOV = higher resolution