Added support for texture sampling