Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AlexanderOcias/UnityPixelArtCamera
Easy pixel art camera rendering in Unity
https://github.com/AlexanderOcias/UnityPixelArtCamera
Last synced: 3 months ago
JSON representation
Easy pixel art camera rendering in Unity
- Host: GitHub
- URL: https://github.com/AlexanderOcias/UnityPixelArtCamera
- Owner: AlexanderOcias
- Created: 2017-11-22T04:28:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-06T03:13:11.000Z (about 6 years ago)
- Last Synced: 2024-07-14T14:32:40.730Z (4 months ago)
- Language: ShaderLab
- Size: 112 KB
- Stars: 119
- Watchers: 10
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
- awesome-unity-open-source-on-github - UnityPixelArtCamera - Easy pixel art camera rendering (Camera)
README
Unity Pixel Art Camera
======================
Solves the key issues with pixel art rendering in Unity with no headaches.1. Displays sprites without distortion
2. Enforces a consistent pixel size
3. Conforms to a pixel grid
4. Retains position stability while camera moves
5. Fills the screen in a predictable way
6. Avoids floating point precision errorsSetup
-----
It’s super easy to get started:1. Put the PixelArtCamera component anywhere in your scene (I recommend on your camera)
2. Connect the Camera and Canvas in the appropriate fields if they’re not automatically filled in.
3. Set the resolution on the PixelArtCamera component to your preference (and match the Pixels Per Unit to your texture imports, if you haven’t left it on the default ‘100’.)
4. Put a material using the ‘Ocias/Pixel Art Sprite’ shader on your sprites.That’s it!
FAQs
----
* **Why is my font not displaying correctly?**Make sure you configure its import settings for pixel art. Set the asset's font size to the designed value, set the rendering mode to raster, and make sure the text object uses the same font size.
* **Why is my world-space canvas not displaying correctly?**It may not be matching your game's pixels-per-unit settings. Set the scale of your world-space canvas to (1 / Pixels-per-unit).