Jump to content

Tilingsprite blank horizontal line visual bug


LaczkoUr
 Share

Recommended Posts

I'm trying to use tilingsprite for the ground layer, and moving background layers in a 2d scroller game.

There is a small but easily noticable visual bug at the edges of the textures.
It seems like pixijs puts the second texture one pixel farther, than it should be.

 

I scale all pixi.DisplayObject to fit the screen, in the current image the scale was between 1-2.

I tried it out with scale=1, but the result was the same.

 

 

I could work around this issue, by using 2 textures, and do a custom tilingsprite, but I think it would be nicer to use the pixijs one.

 

It would be important for me to fix this issue.

post-6323-0-58990300-1393537920_thumb.pn

Link to comment
Share on other sites

I want to make my game scaleable to any resolution. The integer scale is not enough.

I will try to the following.

On resize, and gamestart event

  1. create a new rendertexture with the necessery width-height.
  2. I put the original texture in a temp sprite
  3. scale it to the required value
  4. render the sprite on the rendertexture
  5. put the rendertexture in to the tilingsprite.

Since the rendertexture's scale will be 1 the tilingsprite will render it correctly on the screen.

 

This could be a garbage collectors wet dream, but : 

I will restrict to max 1 resize / sec, since every resize about 5 rendertexture have to be (one for each tilingsprite) created/dropped.

 

Does this makes sense?

Link to comment
Share on other sites

This sounds like a bug to me. Using gl.REPEAT should not produce seams if you have a power of two texture.

Also might want to double check and ensure the texture itself is seamless, and isn't the problem. And check the canvas renderer to see if the issue shows there as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...