Added more texture logic