try making a material function with a texture sample parameter in it to use instead of the TextureObject