Best way to get retro resolution (640x480) without antialiasing?

I am trying to set the resolution to 640x480. I want the final images to use nearest neighbour and not be anti aliased at all but I cannot find a way to do this.

FYI - I have achieved this using a post process but I want to be able to set the resolution natively.

Any help/advice gratefully received :slight_smile:

I am not sure if you can get nearest neighbour on the rendering without redoing some of the rendering code in C++. The best solution that would be relatively simple, would be to set the resolution to 640x480 and use a post process material.

There are a few varieties of post process materials when it comes to Unreal, as well as tutorials. Here is one I have for sale which has some cool extra stuff: Elias Wick | Pixelate Advanced

Thanks for the reply @EliasWick I had found similar information myself but was hoping there was a wizard out there that had figured it out.

I am willing to use a low resolution in conjunction with a post process but I’m struggling with that too! Nothing I try to set the resolution to 640x480 actually changes anything! It’s driving me crazy!

this way

1 Like

Thanks dude. I had found that one - it’s really helpful but I was hoping to avoid getting this effect using post processing.

You really should not be doing this as a post process, and definitely not by just using a ceil of the multiplied screen coordinates. Suppose you are on a 1080p monitor and want it to look like it’s rendering at 960x540 (meaning all the pixels are twice as big). By doing this in the above post process approaches, you are throwing away 3/4 of the work your GPU just did to render the frame.

You are quite literally, in the purest possible sense, throwing performance away.

The right way to do this is rendering at a lower screen percentage and setting the upscale quality to 0, which will use nearest neighbor.

r.ScreenPercentage 50
r.Upscale.Quality 0

You will need to make sure you have your antialiasing set to Off, FXAA, or TAA. TSR won’t work.

This will actually render at a lower internal resolution than what is output to the screen, meaning you don’t waste any work on pixels that won’t be shown.

3 Likes

Hi @Arkiras Thanks for the reply.

I had hoped to use the method you have described - this is how I would have done it in UE4. I can’t get it working though. For some reason, screenpercentage isn’t having any effect for me in editor or when I play the game. I can’t get upscale quality to do anything either. Not sure what the issue could be with it.

Have you got any ideas?

Not sure honestly. It doesn’t work in the editor viewport but it should function fine if you play the game in standalone

1 Like

Arkiras method works perfect. Here is a video of the test:

You will notice on very low values. remember the value is a %, not the actual resolution
so changes are like exponential in the lowest end.

Also you will still have some antialiasing effect on the final results:

2 Likes

I’ll try again in a new blank project - maybe something I did screwed it up

This is great, although the edges still look blurry and not crisp like I’m looking for. Maybe the only way to get the result I want is using post processing sigh

Disable antialiasing and it will be crisp

1 Like

That does look pretty crisp. Was this done in the latest version of UE5?

5.2 preview

Awesome. I must’ve done something stupid. I’ll create a new, blank project later and see if I can get the screen percentage and upscale quality commands to actually do something.

Thanks for your help with this - very much appreciated :slight_smile:

How low can you take the resolution before it looks blurry?

Makes no difference how low you are, if AA is disabled it will always look crisp.

The only “antialiasing” effect should be from shadowmap sampling, which you can disable by setting r.ShadowQuality 1 (this assumes you are not using virtual shadowmaps, I don’t know how the setting will behave in that case)

Thanks for your help. I have finally had time to test this in a new project and I still can’t get it to work properly. I have antialiasing off and have used r.Upscale.Quality 0. This works fine and I can see some nice jaggies. The problem is with the screen percentage command. It just will not work. I have no idea what I’m doing wrong. I’m on 5.1.1 could it be a problem with the version? Do you think it will work agian in 5.2?

Also, screen percentage does work for me but won’t that give different results based on what a user’s default screen resolution is? I’d ideally like to be able to set a fullscreen resolution for 640x480. The r.setres command is also not really working for me :frowning:

Works for me in 5.1.1. Unless you can find an issue for it on the bug tracker it’s probably specific to your project and I wouldn’t expect 5.2 to magically fix it.

You will have to calculate the desired value based on the users screen resolution. You’d have to do the same thing with a post process material.