Unity Blurry Textures – Mipmap Bias Guide

Blurry textures when viewing objects at a distance are caused by mipmaps. However without mipmaps objects may appear visually worse as well as being worse for rendering performance.

This guide explains how to control the blurriness of Unity texture mipmaps without needing to disable mipmaps completely.

Mipmaps & blurry textures

When enabled on texture import settings, mipmaps are smaller versions of textures used when rendering textures far from the camera. This allows textures in the distance to appear smoother and also improve rendering performance giving the GPU smaller textures to render.

Want to learn more about mipmaps and how to use them effectively? Check out the mipmaps section of this guide: https://www.unity3dtips.com/unity-texture-compression-android-ios

Unity scene with mipmaps enabled
This example shows high resolution textures with mipmaps enabled; at a distance they become overly blurry making the textures appear low quality far away from the camera.
Unity scene with mipmaps disabled
Without mipmaps the same example scene becomes very heavily aliased. Anti-aliasing would help the scene but shouldn’t be relied on due to the heavy performance cost of anti-aliasing.

Tweaking mipmaps to find an in-between point

Unity has an hidden unexposed value called mipmap bias which allows tweaking of texture import settings to find a good midpoint between being overly blurry and heavily aliased.

However to modify this value you either need to use an editor script or put Unity into developer mode to expose the inspector internal debug mode.

How to enable Unity developer mode

Unity’s developer mode exposes a few extra internal debugging options which add hidden functionality. Although beware that some internal options may cause unforeseen issues and break your project if changed! Always keep a project backup and furthermore avoid changing values without knowing their purpose first!

Internal developer mode is only available in Unity 2018 and later. To activate Unity developer mode simply set the playerprefs key “DeveloperMode” to true.

UnityEditor.EditorPrefs.SetBool("DeveloperMode", true);

Use developer mode to change texture import mipmap bias

With internal developer mode enabled you have access to the internal-debug mode from the inspector. These steps show how you can change the mipmap bias for the texture importer.

  1. Select the texture(s) you wish to tweak the mipmap settings for.

    Select the textures in the project window.

  2. From the inspector window choose internal-debug from the hamburger menu.

    The “hamburger menu” is the 3 lines top right of the inspector window.

  3. Find & expand the texture settings foldable section.

  4. Adjust the mip bias value.

    A higher value makes the texture blurrier whereas a lower values makes the texture sharper.

    Unity recommends not using a value below -0.5 as it reduces rendering performance. This seems strongly based on usage so it’s best to try out different settings on lower-end devices if a value below -0.5 gives better results.

  5. Re-import the texture(s) to have the changes applied.

    The textures must be re-imported for the mipmaps to be regenerated with the new mip bias values.

Steps from above shown in video format:


9 Comments on “Unity Blurry Textures – Mipmap Bias Guide”

    1. Render textures render what your camera sees, so you’ll either need to set the mipmap bias of the texture your camera is rendering such as a road, increase the resolution of your render texture or turn on anti-aliasing for your render texture.

  1. Hey, where am I typing “UnityEditor.EditorPrefs.SetBool(“DeveloperMode”, true);”

    Thanks

  2. hi, this is pretty neat, though for some reason it does not work in my build on android, is there a setting somewhere i need to check so i get the same result in the build as in the editor?

    1. It works on android devices fine, make sure on android your quality settings have the same anistropic textures setting as what you’re testing with in the editor.

Leave a Reply

Your email address will not be published. Required fields are marked *