A question about shaders and removing unwanted variables

Aha! Thanks that makes a lot of sense actually.