Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Texture atlas mipmapping

Discussion in 'General Graphics' started by Megolas, Mar 17, 2015.

  1. Megolas

    Megolas

    Joined:
    Apr 6, 2013
    Posts:
    25
    I'm currently working on a voxel terrain, but I'm encountering issues when trying to use a texture atlas on each block: http://imgur.com/a/5T7tI (Red used to make the effect appear better)
    I get seams from nearby textures on each block. I've tried turning off mipmapping and adding 1 pixel padding, but both just lessen the effect, and not remove it. Is there a way to mipmap each tile, or any other way to fix this?
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,848
    you need wider borders (16-32px).
    and you have to use tex2Dlod instead of tex2D while calculating the needed mip level by yourself.
     
  3. Megolas

    Megolas

    Joined:
    Apr 6, 2013
    Posts:
    25
    Doesn't tex2Dlod only work in opengl? Isn't there a way to do this on all platforms without adding padding (Usage of said atlas?)
     
  4. Megolas

    Megolas

    Joined:
    Apr 6, 2013
    Posts:
    25
    Bump.
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,848
    no
    no