When a photon goes through a material that is moving perpendicular to the photon very fast, when the photon exits the material it will be displaced horizontally by a certain distance. Where does this come from?
While propagating through any media, photons interact with electron shells of atoms. That's how the phase speed of light and correspondingly the refraction index are derived. If media moves perpendicularly to the direction of light propagation, there is no Doppler shift in the phase velocity (i.e. frequency of EM wave) but the additional, perpendicular to main, impulse is added to photons. Technically there should be some minuscule angle shift in the light propagation direction.
at first we should know that photon represent a spectrum of wave length and for each region there is a type of interaction as example the Uv and Vis range represent electronic transition in the atomic or molecular level of the material and IR may be interacted with a material and it's energy absorbed as vibrationa energy for material contituent and other form of interaction and for example you can read about some type of interaction like photoelectric effect at the following link
The effect of interaction of the photons with moving media depends on the ratio of V/c where V is the velocity of the media with respect to the coordinate system of the observer and c is the speed of the light.
The detailed analysis of such effects you can find for example in the paper "Reflection of the light from a moving mirror and related problems" by B.M.Bolotovskii, S.N.Stolyarov in Sov.Phys.Usp., vol. 32, n. 9, 1989, pp 813-827.
Thank you for raising an interesting problem which can be worked out using Lorentz transformations. Let us consider a Lab frame and an inertial frame in which a slab of a medium is at rest Let the photon be incident normally on boundary of the slab which we take as x axis and let us take the direction of motion of incident photon as y axis. Let us further assume that the slab is moving with velocity moving with velocity v=βc along x axis.
For frequency ω, components of propagation vector of incident photon are (0, k = ω /c , 0). Lorentz transformations transform these to (-βγk, k, 0), where γ = (1-β2)-1/2. The angle of incidence is thus -tan-1(βγ) which is nearly β ( as β is