Hello,
While going through some code in Cocos2d, I found something that might be
of interest to you:
image = atlas.get_region(x, y, width, height)
# set texture clamping to avoid mis-rendering subpixel edges
gl.glBindTexture(image.texture.target, image.texture.id)
gl.glTexParameteri(image.texture.target,
gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE)
gl.glTexParameteri(image.texture.target,
gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)
See if this can fix your problem.
Dan.
Le samedi 16 avril 2016 09:37:35 UTC+2, ZOnline a écrit :
>
> I have been testing my game in just one resolution for quite a while.
>
> Today I decided to change the resolution to something bigger to test out
> and to support more resolutions and see how they behave. I began to notice
> that tons of textures are bleeding through my tileset and animated
> textures. Sometimes they disappear if I zoom in, or move the character,
> sometimes they bleed on different sides, and sometimes the bleed disappears
> entirely.
>
> I have googled a ton on this but can't find any resolution. So I have
> checked the following:
> *Mipmap issue*: Not using mipmapping
> *Issue with filtering*: Changed pyglet to use GL_NEAREST not GL_LINEAR
> for textures. Not using AA or other sampling.
> *Texture coordinates are incorrect*: I am assuming pyglet's are correct
> as I have not changed this.
> *Set clamping*: Tried setting clamping in all of the places that set the
> min/mag_filter.
> *Camera is sampling floats*: I've made sure to force camera movement in 1
> pixel increments to make sure it doesn't get in-between a pixel.
>
> I have checked all of these and the issue still remains. What am I missing?
>
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.