texture->currentmaterialflags = texture->basematerialflags;
texture->offsetmapping = OFFSETMAPPING_DEFAULT;
texture->offsetscale = 1;
texture->currentmaterialflags = texture->basematerialflags;
texture->offsetmapping = OFFSETMAPPING_DEFAULT;
texture->offsetscale = 1;