- Home /
2D object resolution
I'm new to Unity and am tinkering with the graphics. I'm trying to make 2D objects by putting textures on planes and aiming the camera (in orthographic mode, of course) at their faces, but I can't seem to get the resolution of the objects quite right. I want each pixel in the texture to take up exactly one pixel on screen when the game is playing.
How do I set things to force this to happen?
Answer by ibyte · Dec 11, 2009 at 02:52 PM
As Jaap mentions SpriteManager is a good package and in particular SpriteManager2 has a Pixel Perfect option - http://www.anbsoft.com/middleware/sm2/
Yes but won't pixel perfect screw up the alignment of any textures if the resolution changes?
Anslem, pixel perfect means just that. You need to supply the proper texture for each resolution. If you don't use pixel perfect then your subject to scaling.
Answer by Jaap Kreijkamp · Dec 11, 2009 at 10:42 AM
It's difficult to get it exactly right, part because OpenGL handles the way texture pixels are mapped to screen pixels a bit different. Possibly a good point to start is:
Your answer
Follow this Question
Related Questions
Small line appearing under my 2D pixel sprite - 2D Graphics not rendering properly 2 Answers
Draw only what is seen in camera 2D? 1 Answer
How can I unfocus and fade my background in a 2D game? 0 Answers
How to make the pixels of an object that are obscured by a specific object transparent Unity2D 1 Answer
2d graphics 3 Answers