partialy optimized texture version