Original Post
Hi, Let's say I have an image as a unsigned char *, and I want to sample it at a given coordinate. For the moment, I do something like :
And pixel interpolation gives me a lot of thesis. I just want a simple algorithm that would be easy to implement ^^ Anyone has a link or some documentation that would help me to implement texture filtering ? Thx in advance
int indexX = nearestInt(u * imageSizeX);
int indexY = nearestInt(v * imageSizeY);
return(image[indexX + indexY * imageSizeX);
This gives simple point filtering. Now I'd like to implement a trilinear filtering (or simply a bilinear or linear filtering), but each time I search for texture filtering in google, I found tons of tutorials on filtering with OpenGL or DirectX