Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Texture formats for Base Map Gen shader

Discussion in 'World Building' started by Arycama, Dec 12, 2019.

  1. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    183
    I've been attempting to change the texture format for a custom Terrain Base Map Gen shader. However the available formats seems to be somewhat limited and not documented.

    The default is RGBA32, and I see that the Standard BaseGen uses R8 and A2R10G10B10. RG16 also seems to work. However, I want to use a 16-bit RGB format such as R5G6B5, or ARGB1555 as this is for a mobile shader and a 32-bit format is unneccessary, especially as I don't need an alpha channel due to not having specular.

    I thought the texture format would match the RenderTextureFormat enum, but this does not seem to be the case. Some textures work and others don't.

    Is there a list of supported formats, and plans to add support for additional formats? There should also be an option to use compressed formats (Eg DXT1/5), even if this requires them to be generated in the editor and included in the build, as opposed to generating them at runtime, as rendering with uncompressed textures especially on mobile is not ideal.