MJW Posted December 26, 2017 Share Posted December 26, 2017 I'm confused about how GetBilinearSample is supposed to behave on the last pixel in a row or column. The situation is complicated because pixels need to be numbered from the upper-left corners so that fetching a pixel using GetBilinearSample will return the exact pixel when the coordinates have integer values. Pixels with non-integer coordinates are interpolated from the four surrounding pixels. The question is: how are samples handled when X is between Width-1 and Width? There are no rightward pixels to interpolate from. The way I thought it worked, and the way I believe it used to work, is that the last pixel in a row was not interpolated in X; the last row was essentially clamped to provide the rightward pixels. (Which also means the corner pixels are not interpolated at all.) Now, based on what I've seen in some tiling code I wrote, it appears to me that the last row and column fade to transparency. So the rightward row is, in effect, transparent. I can live with either, provided I know what it does, but I think the way I thought it worked is the better of the imperfect options. I think that if an opaque surface has a width of 100, there should be 100 opaque pixels in each row. even when subsampled. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.