Glsl function - add ModularProgram

I don't get it why `template_vars must now be a list of sets. But also `var not in self._template_vars` should now be var not in self._template_vars[0]`