Factor out common code for modifying fragment shaders for translucent pass(es).