A constraint is imposed that the electric field vector must be orthogonal to the ray propagation vector. At isotropic interfaces and coatings, the field is resolved into s and p components with reference to the plane of incidence formed by the ray vector and the surface normal. The s component is the projection along the axis orthogonal to the plane of incidence, the p component the projection within it.
Each resolved component is multiplied by a complex transmission or reflection coefficient. Because the coefficients are complex, both amplitude and phase change. They are computed from the refractive index of the incident medium, the index and thickness of each coating layer, and the index of the substrate. After multiplication, the two components are reassembled into a Cartesian field vector and proceed to the next surface. Where a ray travels normal to a surface the distinction between s and p becomes ambiguous, which is why a reference axis setting is needed.
That resolution and application of coefficients is the treatment for isotropic interfaces and coatings. Not all polarization calculation proceeds this way. Birefringent media are handled between dedicated entry and exit surfaces, with ordinary and extraordinary rays traced separately. Which is traced, or whether one is traced while the phase rotation from the other is taken into account, is a mode setting. Where an ideal polarizing element is represented by a Jones matrix surface, a two-by-two complex matrix acts directly.