Game Development Reference
In-Depth Information
Pixel snap : This option makes the rendered sprite crisper but narrows the drawn
area. It is a trial and error feature (see the following sections for more informa-
tion).
Tip
Achieving pixel perfection in your game in Unity can be a challenge due to the number of
factors that can affect it, such as the camera view size, whether the image texture is a
Power Of Two ( POT ) size, and the import setting for the image. This is basically a trial
and error game until you are happy with the intended result.
If you are feeling adventurous, you can extend these default shaders (although this is out
of the scope of this topic). The full code for these shaders can be found at ht-
tp://Unity3d.com/unity/download/archive .
If you are writing your own shaders though, be sure to add some lighting to the scene;
otherwise, they are just going to appear dark and unlit. Only the default sprite shader is
automatically lit by Unity. Alternatively, you can use the default sprite shader as a base to
create your new custom shader and retain the 2D basic lighting.
Tip
Another worthy tip is to check out the latest version of the Unity samples (beta) pack. In
it, they have added logic to have two sets of shaders in your project: one for mobile and
one for desktop, and a script that will swap them out at runtime depending on the plat-
form. This is very cool; check out on the asset store at ht-
tps://www.assetstore.unity3d.com/#/content/14474 and the full review of the pack at ht-
tp://darkgenesis.zenithmoon.com/unity3dsamplesbeta-anoverview/ .
Search WWH ::




Custom Search