public float GetMipLevelForRendering() { if (target == null) { return(0.0f); } if (IsCubemap()) { return(m_CubemapPreview.GetMipLevelForRendering(target as Texture)); } else { return(Mathf.Min(m_MipLevel, TextureUtil.GetMipmapCount(target as Texture) - 1)); } }