Distortion and Artifacts with TexturesPixel and Sprites using URP. Any Advice on Creating Smooth, Pixel Perfect Graphics?

Problem (demonstration clip and timestamps below)

Demonstration clip [https://youtu.be/oZHseh_4juY]

1.1. Pixel distortion on tileset textures creating lines, especially with pixels close together. 00:00 - 00:27

1.2 Pixel distortion on sprites (especially clear in the eyes and face) 00:27 - 00:30.

2.1 Depth aspect of the water shader used for shallow colour is affecting everything rendered in front of the water (Depth priming is disabled and rendering path is forward +). 00:30 - 00:33.

Desired Outcome

What I’ve tried

  • Maintaining a consistent pixel per unit size of 32 on all textures and sprites.
  • Setting all textures to Point (no filter) and no compression.
  • Turning off all anti-aliasing options.
  • Testing with default materials and shaders (problem still occurs).
  • Using the Pixel Perfect component for the camera (with the Cinemachine pixel perfect component attached to the relevant virtual cameras).
  • Modifying packages designed for 2D pixel perfect display.

Version: Unity 2022.3.32f1

Render Pipeline: URP

I know what is the problem, the video you show of dragon quest is not pixel perfect, all your issues come from trying to make it pixel perfect

if you notice the background is all 3d, and its not point filter, so when it gets far from the camera it gets blurry and so there are no imperfections from pixel perfect

for the characters is more complex and it must be done with high lvl shader tricks that I also want an answer

but thats it for you, turning off anti alias, making it pixel perfect etc, is gonna give you all the imperfections that you mention

pixel perfect is for stuff that is always the same size, no depth, when stuff goes far away from the camera its all gonna change size

Here is what I recommend you, check this game alabaster dawn:

they have done amazing work making 2d in 3d and the devs are very friendly and helpful I recommend you to go on their discord

and go on the channel alabaster dawn general they have a lot of stuff you can see, and you can try to ask them about it, they regularly answer questions from fans, you can try ask them for advice

Here on unity forums i severely doubt you will find any answers for this style

1 Like

yeah, there’s not really such a thing as pixel perfect 3d rendering. the assets may be 2d, but the inclusion of depth alone ruins that possibility. you can reduce the aliasing on textures by using mipmaps, or anisotropic filtering (which only works with trilinear, so maybe not applicable for you.)

there are certain shaders unity includes that have a pixel snap feauture, but i’m not sure which.
you can also snap to pixels in a shader using UnityPixelSnap().

as mentioned though, pixel snapping may hurt you more than it helps you.

1 Like

Thank you, I’ll check them out!