Thanks Jaswant and David for your replies.
The texture mapping remained as before with SetInterpolateScalarsBeforeMapping(true)
The blog post that David mentioned is also very helpful.
It has given me a better understanding on the underlying reason
I will explore further on this.