multi-texture support (back-ported from v5.0 cyclops module)