Hi all!,
I’m currently working on a game, that is primarily uses 2D artwork. However, I have a problem that when bringing in this artwork and making them materials to place on planes, they don’t look great. Artwork that uses the transparency shader has hard edges.
My question is, how would I make my artwork looking nice and crisp with transparency. I’m trying to go for a vector style like Bad Piggies.
Any help would be greatly appreciated :).
Thanks.
I don’t understand your issue.
I use SM2. It has a shader by default, 2D art for iPhone, which I use. Essentially, bring in your work. Slap it on a material and away you go. You can adjust the settings of the texture. This can effect the quality. Look into that.
If you are using the “Cutout” Shaders, that will cause the hard edges. You need to use a shader that does alpha blending. Here is one that was posted somewhere on these forums a while back:
//Originally by Bill Vinton (Sync1B)
Shader "My Shaders/AlphaSelfIllum" {
Properties {
_Color ("Color Tint", Color) = (1,1,1,1)
_MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white"
}
Category {
Lighting On
ZWrite Off
Cull Back
Offset -1, -1
Blend SrcAlpha OneMinusSrcAlpha
Tags { "Queue" = "transparent" }
SubShader {
Material {
Emission [_Color]
}
Pass {
SetTexture [_MainTex] {
Combine Texture * Primary, Texture * Primary
}
}
}
}
}
If you create a new shader in Unity and assign your material to it, that should help with the alpha smoothly fading at the edges. As was was mentioned below, you will need to try different import settings in the inspector as well to get the best results.