Forum rules - please read before posting.

Resize and Pixel perfection

edited May 2017 in Technical Q&A
Hey Chris,
I have made this render texture to render the screen view to a quad for a pixel perfect render.

Each camera is ortho and is set to 67.5 which is 135/2 for the resolution i want for the game.

The Main Camera is there just for navigation sake. it renders nothing.

Render Camera is outputing to a rendertexture.

Virtual Camera can only view the quad in front of it that is set to its own culling layer.

All my sprites are set to Pixels per unit 1 and the speed is set accordingly to move these giant assets. (walk speed scale: 40)

image

I am experiencing weird issues now that i added the rendertexture camera. The pixels are sliding due to the camera going to bad float points. The character does this weird glitch (shakes left and right repeatedly) when it stops or finds it hard to navigate at times. The navigation also has trouble finding the areas in my scrolling scenes. Can you give me some insight to what I am doing wrong?

image

Comments

  • Welcome to the community, @raheelz.

    IIRC, @humaldo looked into pixel-perfection for his games.  You might want to PM him to see how he got on in the end.

    You haven't posted any code so I can't comment on the specifics, but the theory sounds OK.  I wonder if un-parenting the Virtual Camera will have any effect, as I'm not sure it needs to move with the MainCamera.

    I think there's probably a few approaches you could take to pixel perfection, have you investigated any others?  This one is free and covered in the Unity blogs.
  • that sounds resourceful, thanks Chris. I will try out these other techniques and see what works. seems like the virtual camera moving could be an issue that is causing this.

    Can you tell me if increasing the size (ortho camera size) causes any issues with AC. i can increase the speed and scale up the guides accordingly but wondering is anything else needs to be fixed.


  • The main thing will to keep mindful of is the "Destination accuracy" slider in the Settings Manager, which will need to be lowered the larger your assets / more zoomed out you are.  Section 3.11 of the Manual covers what this does and why it's necessary to change in more detail.
  • thanks, ill go read it! :thumbsup:

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.