Rendering at a lower resolution

I’m trying to get Unity to render at 320x240 but display at whatever resolution the player chooses. I found this thread:

http://forum.unity3d.com/threads/157433-Unity4-how-do-you-set-render-resolution-(separate-from-screen-resolution)

Which seems to imply that I simply set the screen resolution. I can’t really tell if its working or not. It renders at what appears to be 320x240, but I’m not sure if the actual resolution is any different.

I also tried doing the same thing in a window, and found that the window size was directly tired to the resolution I set. In other words, the window was 320x240. When I allow the player to resize the window, the resolution seems to reset along with it. I.e, the larger the window is, the higher the resolution.

So in other words, I’m not sure if the SetResolution command is working like I want. Does anyone know how I might check, and if it isn’t working, how I could get Unity to render at a lower resolution than it displays?

1 Like

I hate to bump a post, but I’d really appreciate some help with this.

1 Like

I suspect the feature in the linked thread is only actually available on mobile (or other devices where apps are forced to be fullscreen at a particular resolution). Which platform are you targeting?

PC. It’s really important that I can render at a low resolution for the art style I’m experimenting with.

I also suspect that in full screen it’s actually rendering at 640x480, but I know that it renders at 320x240 in a window. I just need a way to resize the window and keep that resolution :P. Or, get it to render at 320x240 in full screen I guess.

You’d need to use a rendertexture, where you render the camera to a 320x240 texture and display that as a full-screen texture. Keep in mind that 320x240 is a 4:3 aspect ratio, and widescreen is more typical these days.

–Eric

Do I need pro edition for that?

Yes. Real-time tools for 3D, AR, and VR development | Products

–Eric

Dang it. Is there any possible way to do this in standard?

1 Like

Not that I know of, sorry.

–Eric

Drat. Ok, thanks anyway.

Is there code somewhere that demonstrates good practice for this?

A GUITexture with scale set to 1, 1 and positioned at .5, .5 (with all texture inset values at 0) would work.

–Eric

That does work, and it actually is probably the easiest solution for several render textures on the same screen. But is there any method that doesn’t require a second camera? Graphics.DrawTexture seems to not be reliable. Maybe I’m just not calling Graphics.Blit Graphics.DrawTexture at the right time. What “Messages” function is recommended?

As far as I know you need a second camera.

–Eric

Okay, thanks for the informed belief!

I’ll still need to know when to do the blitting, to make sure that the GUI Texture isn’t updated a frame late. Maybe the water FX package will teach me. The documentation didn’t answer this, and testing things out just froze my entire OS except for mouse movement, several times, so I’m not interested in experimenting anymore.