Tex3d How does it look up a value

I am curious how tex3d looks up a value in a texture. In this example:

	sample = tex3D(tex, pos.x*0.5f+0.5f, pos.y*0.5f+0.5f, pos.z*0.5f+0.5f);

where would the value come from in the texture?