added working texture sample and bebetter documentation for code