update texture with the help of @Diangle