With Canon cameras, ETTL sends out a pre-flash millliseconds before the actual flash. The light going Through The Lens (TTL) is measured, and an appropriate flash output is sent out based on the measurement. It doesn't care about the aperture, focal length, whether you have a polarizer on the lens, etc. All of those things will change the measured preflash so they don't have to be taken account of. I assume the Nikon is somewhat similar, though I don't know exactly how it works.