On Apr 10, 12:20 pm, Greg Ewing <[email protected]> wrote:
> bobmitch wrote:
> > When blitting textureatlas images to screen with non-integer
> > coordinates (really necessary for visually appealling and smooth
> > scrolling/movement) there are sampling artifacts from adjacent
> > textures in the atlas.
>
> To prevent that you need to adjust the texture coordinates
> so they start half a texel in from the edges of the
> subtexture.
>
> E.g. if your subtexture is 100x100, then you use texture
> coordinates (0.5, 0.5, 99.5, 99.5).
>
> --
> Greg
Thanks for the tip Greg - I will give it a go tonight.
It would be nice if this could be achieved by passing a flag to the
add function of the textureatlas object, ie:
sprite_a = atlas.add (sprite_image, border=True)
Rather than having to set a 12-tuple every time I generate a texture
region.
Cheers.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---