OpenGL ES Tiled Texture Mipmap problem - iPad/iPhone -


enter image description herei'm running traditional tile/mipmap problem on ipad using opengl es. basically, if have large texture (larger 1k x 1k), can break pieces , map pieces onto individual polygons. can clamp texture coordinates edges , works, artifacts along boundaries.

now know why , know traditional solution is. wit, make border around outside of each littler texture (say 6 pixels). sample little textures big 1 you're using inside pixels (say 256-2*6). smear valid pixels out border area. lastly, map texture coordinates use valid inside pixels. works okay.

if you're not nodding along @ point, don't try answer. :-)

anyway, opengl introduced clamping modes way in day solve this. don't see modes in opengl es (at least on hardware) , see other references problem. i'm wonder if i'm missing something. there newer way solve tile/edge problem i'm not aware of?

[update] screen shot of result attached here. visible line @ end of 1 texture , start of another. using clamp_to_edge.

gles supplies gl_clamp_to_edge not gl_clamp, clamps centres of outermost pixels in texture rather extreme edges. out-of-bounds (border or wraparound) accesses prevented clamp_to_edge not clamp.

clamp_to_edge part of gl es specification (as per here 1.1 , here 2.0), if hardware doesn't support it's not technically gl es compliant. it's available in full open gl, think of version 1.2. it's implied clamp_to_edge made leap es clamp didn't because former considered fixed version of latter.

it sounds me clamp_to_edge should suitable you're doing — have misunderstood?


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -