You could do this in the floor material by using a depth render target, darkening any area that is occluded (in shadow)