I see, thanks.

Yeah, removing the texture from the atlas does fix it. I'd like to
keep the framerate if I'm able to though

Ahar! So adding a blank 1-pixel tall image to the atlas between each
horizontal row of textureregions seems to make it go away.

        from pyglet.image import load, SolidColorImagePattern
        SPACER = SolidColorImagePattern((0, 0, 0, 0)).create_image
(1024, 1)

        for filename in glob('%s/*.png' % (IMAGES_DIR)):
            self.atlas.add(SPACER)
            region = self.atlas.add(load(filename))
            ....

Not a watertight fix, no doubt, but it seems to work for my particular
set of images, which aren't likely to change much at this stage.
Hurrah! Thanks for the pointer Tristam.


On Nov 30, 11:53 pm, Tristam MacDonald <[email protected]> wrote:
> On Mon, Nov 30, 2009 at 4:22 PM, jonathan hartley <[email protected]>wrote:
>
>
>
> > Hi there list,
>
> > I noticed that since I started subtly rotating my pyglet sprites (with
> > images stored in a texture atlas), i am seeing brown artifacts along the
> > sprite's top edges (here enlarged 8x):
>
> >http://brokenspell.googlecode.com/svn/trunk/docs/screenshots/unexpect...
> > I'm talking about the single-pixel straight lines above each duck.
>
> > I read what Brian wrote on this thread with much interest:
> >    "Depth buffer tile sorting?"
>
> >http://groups.google.com/group/pyglet-users/browse_thread/thread/7647...
>
> > Is what I am seeing perhaps exactly what Brian described?
>
> Regardless of what Brian described, you are seeing 'pixel bleed' from the
> next image in the texture atlas, due to the bilinear filtering. Either set
> the texture filter to GL_NEAREST, or remove your texture from the atlas, and
> the artefacts should disappear.
>
> --
> Tristam MacDonaldhttp://swiftcoder.wordpress.com/

--

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.


Reply via email to