better logic of shader type detection