Hello,
I’m making a 2D game. The important thing is to make camera show only the required area no matter which resolution is selected. I’m using Pixel perfect Camera for that with Stretch Fill, so it fits any resolution.
Another think I have is a shader that inverts color if vertex position is lower left from inputted screen position (red circle here). This shader works correctly when I don’t used the Stretch Fill, but when it is on, it moves the screen position of inputted object away as you can see from these images (Screen position is passed as vector Camera.main.WorldToScreenPoint(circle.transform.position)![]()
16:10 aspect
Full HD
QHD
The screen position offset then changes based on different resolution. If I turn off stretching, output is correct, but i can see around the room.:
Any idea how to go around this or possibly other way of doing it? What I’m looking for is a way to show tilemap of specific resolution (496x288) on any camera resolution with black borders around…



