Search Unity

Performance cost of having a material with many textures vs combining all of the textures into one

Discussion in 'General Graphics' started by Snubber, Apr 7, 2021.

  1. Snubber

    Snubber

    Joined:
    Jan 20, 2020
    Posts:
    65
    Hello! I am creating a game with block build (like Minecraft) I have all of the block textures combined into one texture for "performance reasons". But the issue with this is that I can't generate mip maps so I get artifacts like this (see attached image) when looking at the material from afar.

    I'm thinking I should just make a material with a custom shader that can have many individual textures on it with generated mip maps. But I'm wondering if this would hurt performance down the road because I plan on having many different types of blocks.
     

    Attached Files:

  2. Snubber

    Snubber

    Joined:
    Jan 20, 2020
    Posts:
    65
    I have discovered in Unity 2020 you can import a texture atlas as a texture2darray which fixes the mip map generation issue!