All Questions

Community

C
Zambzz

Stretch modes in project settings causing visual defects.

Initial i chose the option of 2D following the tutorial but soon found for some reason that it created horizontal line defects in the tileset. I then decided to test out viewport option instead and found the defects disappeared. whats the difference between 2D and Viewport?
  • Nathan Lovato replied
    Solution

    Viewport renders at the game's resolution and stretches that render to the window's size, while 2D renders the game at the window's resolution, so if you make the window twice as big, the game will render 4 times as many pixels.

    The defects you're seeing are linked to texture filtering and happen in every engine. There are some ways to avoid them, like removing the filter option on the texture, or by leaving a bleeding area of a few pixels around every tile on the tileset's image.

  • C
    Zambzz replied

    Thanks for the reply, turning off the texture filtering worked like a charm :D