partial implementation in texture