Unity-Technologies / 2d-pixel-perfect

Pixel Perfect Camera
Other
243 stars 30 forks source link

Camera does not use Culling Mask #10

Open HunterOvadia opened 5 years ago

HunterOvadia commented 5 years ago

The way our scene is setup is we have 2 cameras: one that does the world, and one that does the UI. We have the world camera set to use the Pixel Perfect, and it has its Culling Mask to render everything but our UI, since we do not want our UI to be Pixel Perfect.

We have found an issue that even though our Pixel Perfect camera is not set to render our UI, it still effects our UI, causing it to be Pixel Perfect, therefore making it render blurry.

With Pixel Perfect: pp1

Without Pixel Perfect: pp2

The UI is on a different layer and is only Rendered by its own Camera, and therefore should not be effected by the "Pixel Perfect."

exzizt commented 5 years ago

Why don't you want pixel-style font for a pixel-art game?

HunterOvadia commented 5 years ago

Why don't you want pixel-style font for a pixel-art game?

Just doesn't fit the style we are going for, and it looks relatively bad compared to just a regular font.

awesomez commented 5 years ago

Why don't you want pixel-style font for a pixel-art game?

Indeed -- I need to do depth tricks and use standard 3d camera to do this (but I need the standard 3d camera to stay as it is. )

I was just about to post this issue.

The background shrinks super-tiny and doesn't return the 3d background camera to its original size with "Upscale Render Texture" on. It looks zoomed-in. This is only a problem with "Upscale Render Texture" on.

Is there any way to fix / workaround this? -- What script should I modify to ensure this works properly?

Macyrate commented 4 years ago

Have you found the solution? I just encountered the same problem.

awesomez commented 4 years ago

Seems like this needs to be brought up in the Universal Render Pipeline threads since that is the direction Unity is now moving. This has been open since Feb of last year and nothing has been done about it. Maybe someone else is in charge of getting this kind of thing sorted (i.e. someone like the URP team.)

If something fundamental needs to be changed, they need to be aware of it now before we have to wait 10 years for a fix.

Macyrate commented 4 years ago

I have to give up on using Upscale Render Texture, although the effect is amazing. The weird thing is when I'm using 1280 720 resolution, it works fine…… But in 19201080, I got everything pixelated.

awesomez commented 4 years ago

Is that in-editor? -- Have you tried it in a build at that resolution?

Also, what Unity version are you using?

Macyrate commented 4 years ago

Test in build: 1280-720.png Fine 1920-1080.png Boom!

Version 2019.2.18f1 Personal

And my setting for Pixel Perfect Camera: Asset Pixels per Unit 16 Reference Resolution 320 * 240

awesomez commented 4 years ago

Wow, that's definitely weird behavior! -- Maybe post this as a new issue? D:

This is a big problem. It really seems to go deeper than just the Culling Mask...