Author Topic: Fuzzy edge after update to Unity 2017  (Read 2814 times)

Charriu84

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 9
    • View Profile
Fuzzy edge after update to Unity 2017
« on: November 16, 2017, 04:41:33 AM »
Hi,

I recently updated my project from Unity 5.5.2 to Unity 2017.2. While testing I noticed that some of my sprites now have a fuzzy edge, as you can see on the attached images. But this only happens on iOS devices and unfortunatly not in the editor. I tried many things and at the moment I don't know what could cause this behaviour. So I hope somebody might know what causes this. Here is some additional context:

Because of my unity update I first tested in which Unity version this happens. Everything until 5.6.4 looks fine. It first happened in Unity 2017.1. and is persistent through all 2017 versions.

This is my scene setup. I generate my atlases during runtime. Therefore I load my atlas textures via. www.texture and www.textureNonReadable. The fuzzy white background you can see is a sprite using one of these atlases. The SpriteData is 40 in width and height. The sprite is then scaled up via transform.scale. I'm using OpenGL2. My NGUI version is 3.9.6

Looking at the problem it seems like the whole texture is moved 1 pixel horizontally and vertically. I compared the SpriteData x, y, width and height with my Unity 5.5.2 version and they are the same.
I've also checked the unity changelog, but could pinpoint anything that would cause this.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fuzzy edge after update to Unity 2017
« Reply #1 on: November 23, 2017, 01:25:00 AM »
Since the culprit for the change is upgrading Unity from 5 to 2017, and you're creating your atlas at run-time, I can only suggest you check the texture's format and filter settings. My guess is that iOS either defaults to some texture format that has compression artifacts, or your quality settings for mobiles force compression.

Charriu84

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Fuzzy edge after update to Unity 2017
« Reply #2 on: November 27, 2017, 10:08:48 AM »
I did some test with filter settings and texture format, but it did not solve the problem. I did test it again and format and filter settings are the same as in the editor. All compression is disabled in the quality settings. My Texture Quality is set to HalfRes. Changing it to Full reduced the fuzzy edge, but it was still visible. I've already searched the release notes of unity 2017.1.0f3 (https://unity3d.com/unity/whats-new/unity-2017.1.0) but could find anything hinting to changes to textures, ios and my problem.

Charriu84

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Fuzzy edge after update to Unity 2017
« Reply #3 on: November 29, 2017, 05:06:22 AM »
I solved my problem. With www.texture mipmap was active. Unfortunatly there's no easy way to disable mipmap, so I started constructing my own texture and loading with www.LoadImageIntoTexture. That way I can disable mipmap.