docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CalculateMipBias

    CalculateMipBias(Vector2Int, Vector2Int, bool)

    Returns the mip bias to apply in the rendering pipeline. This mip bias helps bring detail since sampling of textures occurs at the target rate.

    Declaration
    public float CalculateMipBias(Vector2Int inputResolution, Vector2Int outputResolution, bool forceApply = false)
    Parameters
    Type Name Description
    Vector2Int inputResolution

    The input width x height resolution in pixels.

    Vector2Int outputResolution

    The output width x height resolution in pixels.

    bool forceApply

    False by default. If true, we ignore the useMipBias setting and return a mip bias regardless.

    Returns
    Type Description
    float

    The calculated mip bias

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)