cg, changed glsl detection and added automatic preprocesser defines depending on domain (eg. _VERTEX_, _FRAGMENT_ ...) glsl, all functions are in