Search Unity

Unwanted repeated texture on sprites

Discussion in 'General Graphics' started by JuZ-index, Feb 17, 2021.

  1. JuZ-index

    JuZ-index

    Joined:
    Feb 2, 2021
    Posts:
    10
    Hi!

    I made a "2D map" with generated sprites from generated textures made from imported images.
    In my example, my "2D map" is 1536*1536 made from 36 sprites (6*6), each one are 256*256.
    The whole thing is generated programmatically.

    My problem is that each sprite texture seems to be a little smaller than 256px (~255px) so the texture is repeated (the right of the image is repeated at the left - same thing vertically too).

    2D-map-bug.png

    As I found here (and many other times), I tried to fix it applying a material with pixel snap enabled. It did not work.

    I tried to set pixel per unit to 1 too, but did not manage to display properly my sprites (100 time bigger so... with this repeated 100 time bigger line too!).

    I tried playing with images settings too (sprite mode, filter mode, pixel per unit...), ... but same thing.

    image-settings.png

    Any help would be precious on this!

    Thanks,

    Julien
     
  2. JuZ-index

    JuZ-index

    Joined:
    Feb 2, 2021
    Posts:
    10
    As nka_Zz suggests, setting texture wrap mode to clamp works like a charm!!!