Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Shader or anything that can help improve the sprite's quality on Unity? #21

Closed
JakeL168 opened this issue Aug 21, 2013 · 16 comments

Comments

@JakeL168
Copy link

I tried LWF, it's working fine for me, but the texture of the animations looks surprisingly blur.
Here's an example of the sprite (displayed using 2dToolkit), and after it's displayed using LWF:

Using 2dToolkit:
screen shot 2013-08-21 at 4 57 19 pm

Using LWF
screen shot 2013-08-21 at 4 57 52 pm

@splhack
Copy link
Contributor

splhack commented Aug 21, 2013

What Texture2D setting do you use? It seems the setting should be as the following.
Filter Mode: Point
Format: 16bit or Truecolor

@JakeL168
Copy link
Author

This is the setting I use.
screen shot 2013-08-22 at 10 21 04 am

@JakeL168
Copy link
Author

By the way, asides from the image setting you suggested, I've also tried every other combinations of texture settings, and non of them can give me the kind of effect I want.

@splhack
Copy link
Contributor

splhack commented Aug 22, 2013

could you share the texture file?

@JakeL168
Copy link
Author

@splhack
Copy link
Contributor

splhack commented Aug 22, 2013

Thanks. Would you try the latest code?

The previous implementation based on the following information. It seems it is not necessary for Ortho screen.
http://translate.google.de/translate?hl=de&sl=de&tl=en&u=http://wiki.delphigl.com/index.php/Texel_Berechnung

@splhack splhack closed this as completed Aug 22, 2013
@JakeL168
Copy link
Author

Compare to the original looks, the new one still looks very tessellated.
Plus, there's that artifacts for every time I play the animation (for all the textures involved).
screen shot 2013-08-23 at 11 21 10 am

@JakeL168
Copy link
Author

Those artifacts never occur in the previous version though.

@splhack splhack reopened this Aug 23, 2013
@splhack
Copy link
Contributor

splhack commented Aug 23, 2013

Could you try to set "Wrap Mode: CLAMP" on the texture inspector for the artifacts?

@JakeL168
Copy link
Author

Oh yeah. Forget to set it to CLAMP. Yup, that seems to be the cause for the artifacts.

@splhack
Copy link
Contributor

splhack commented Aug 23, 2013

Hm, you are using 6x6 PNG file. Could you try to resize to 8x8 (add 2 transparent pixels for width and height)?

@JakeL168
Copy link
Author

Tried 8x8, and it's definitely sharper, but not what I want~ :)

screen shot 2013-08-23 at 12 55 12 pm

@endavid
Copy link

endavid commented Sep 9, 2013

This may be related to the fact that the UV coordinates calculation appears to be wrong. If I create a 8x8 pixel texture and make it bigger in flash (say, 200x200), the LWF library samples up to half-pixel outside the 8x8 region in the texture sheet, so you will see how the 200x200 region in Unity blends to a different color...

@JakeL168
Copy link
Author

JakeL168 commented Sep 9, 2013

But the thing is I didn't make it bigger in Flash, I retained its original size (8x8) in both the Flash file and in Unity. And the problem still occurs...

@KojiNakamaru
Copy link
Member

Perhaps Unity performs some interpolation and/or includes mipmaps if "Texture Type" is "Texture". Please try the following settings:

  • Texture Type: Advanced
  • Non Power of 2: None
  • Generate Mip Map: Unchecked
  • Wrap Mode: Clamp
  • Filter Mode: Point (Bilinear is okay if the scale is one)

@JakeL168
Copy link
Author

I've increased the size of the image from 8x8 to 32x32... and the result looks better now. It's really just the size problem I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants