Try to add 0.5f to the coordinate of the 2D texture fetching in linear mode.
If you read the appendice of the programming guide the formula given to calculate the interpolation begins by subtracting 0.5 in the coordinate.
so when you write (0.0 , 0.0 ) cuda read it at (-0.5 , -0. 5), the 4 nearest neighboors are (-1,-1) (-1,0) (0,-1) which result in zero because of clamp mode and your point (0,0) which result in 0.25*1.f
hope i am right , it works for me
That work, but it is amazing since, as you say, when using clamp mode it will make sense but I am using Wrap Mode.
Thanks anyway I will try to use this information carefully but if anyone has an explanation of why the wrap mode doesn’t work as it suppose to… will also be very helpful.