{
	if (f != GLSL_TMOD_NONE)
	{
		f = u_tcModParms[tcOffs++];
		if (f == GLSL_TMOD_MATRIX)
		{	// stupid ATI HD2600 can't parse 'a*u[t++]+b*u[t++]+u[t++]' :((
			vec2 sm = st[b];
			float pa, pb, pc, pd, pe, pf;
			pa = u_tcModParms[tcOffs++];
			pb = u_tcModParms[tcOffs++];
			pc = u_tcModParms[tcOffs++];
			pd = u_tcModParms[tcOffs++];
			pe = u_tcModParms[tcOffs++];
			pf = u_tcModParms[tcOffs++];
			st[b].s = dot(vec3(sm, 1.0), vec3(pa, pb, pc));
			st[b].t = dot(vec3(sm, 1.0), vec3(pd, pe, pf));
		}
		if (f == GLSL_TMOD_TURBULENT)
		{
			vec2 sm;
			float now = u_tcModParms[tcOffs++];
			float amplitude = u_tcModParms[tcOffs++];
			sm.x = sin(((glVertex.x + glVertex.z) * 0.125/128.0 + now) * 2.0 * 3.14159);
			sm.y = sin((glVertex.y * 0.125/128.0 + now) * 2.0 * 3.14159);
			st[b] += sm * amplitude;
		}
		if (f == GLSL_TMOD_SWAP)
		{
			vec2 sm = st[b];
			st[b] = vec2(sm.t, 1.0 - sm.s);
		}
	}
}
