Open GoogleCodeExporter opened 9 years ago
I'm afraid this is a common problem with sprite sheets. There is no flag I'm
aware of that can make OpenGL *not* behave this way -- the sampler's only job
is to produce a color value for a given (s,t) location, and has no knowledge
that the fragment being rendered is at the edge of anything. The CLAMP option
works entirely in terms of texture coordinates, which only works for the
single-image-per-texture case.
If you think about it a bit, the only reason our intuition tells us this
problem should be soluble is that we're looking at the mapping of a rectangle
into texture space. But if you think about it in terms of non-rectangular
shapes, the idea of clamping the texture at the border of the rendered
primitive really doesn't make much sense.
Given all that, I don't think we can do much more than document the need for
"guard pixels".
Original comment by jgw@google.com
on 7 Jun 2011 at 3:07
Original issue reported on code.google.com by
pdr@google.com
on 7 Jun 2011 at 2:47Attachments: