The path length in the layer (red lines) is easily calculated. The path difference is this path length, minus the short distance from the point of incidence to the perpendicular line.
Next