Hello Guest

Author Topic: Screen tearing issue.  (Read 3719 times)

Threeli

  • Newbie
  • *
  • Posts: 2
    • View Profile
Screen tearing issue.
« on: October 16, 2013, 01:41:59 am »
Good afternoon,
I've spent the last 9 solid hours with this problem, trolling various forums - trying everything I could think of; but to no avail.  I have an issue where there is strange screen tearing present in my game (in the preview window and in the final build) which does not exist in the scene window.  At first I thought it was my import settings for textures, but I tested with several formats (PNG, PSD, etc) and settings which had no effect.  After this I figured it was just a case of the camera resting between pixels - but no matter how I wrote the code for camera movement I could not find a way to resolve it.  I then thought it might be how I had the camera set up but I created an instance of the provided tilemap demo and supplied only my own tiles - the same thing happened (the only difference being that I use point filtering over bilinear - a requirement for me.)  The location these tears seems random and the severity is increased by moving the camera. 

To illustrate the issue I have set up several cubes in the same configuration as a tile map and produced a screenshot.

I'm hoping it's just something stupid I'm doing!  I do like this product and hope to continue using it.  I'll try and provide any information anyone asks for!
Thank you,

Eli C.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Screen tearing issue.
« Reply #1 on: October 16, 2013, 10:53:53 am »
Hi,

I think this might be because of 2 things:
1. The camera isn't snapped to a pixel (i.e. is on a half pixel boundary), hence occurring more frequently when the camera is moved.
2. Using point filtering by default doesn't add padding, which is fine for big backgrounds, animated sprites. but under some circumstances (eg. tiles) you will be able to see weirdness like this, especially when the camera isn't snapped to a pixel.

Try adding one pixel padding in the sprite collection editor.
Sprite Collection Editor > Settings > Pad Amount = 1 or 2
Commit.
It should get rid of most if not all of the seams.

Threeli

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Screen tearing issue.
« Reply #2 on: October 17, 2013, 01:54:30 am »
Hi!

Thank you for the prompt reply, 
This seems to have fixed all the issues!  I swear I tried everything but that...

Thanks again,

Eli C.