# Change 3D Render Resolution in Godot

I'm making a Mario-Like platformer in Godot, and am going for a N64 style, and I want to lower the resolution of the render, while still having the window being resizable, like in Blender. Is there any way to do this?

Simpler approach is to set "Stretch Mode" (in project settings under Display -> Window -> Stretch) to "Viewport".

With "Stretch Mode" set to "Viewport", the rendered resolution will match the design resolution (in project settings, under Display -> Window -> Size). This may result in enlarged "pixels".

Adjust "Aspect" (in project settings under Display -> Window -> Stretch) to the behavior you want (e.g. "Keep" will keep the aspect ratio, but may introduce black bars, but "Ignore" may use rectangular "pixels").

Refer to the article Multiple resolutions for details.

If you want to change the resolution of the Viewport at runtime, you can do the following:

    var root =  get_tree().root;
root.size = Vector2(100,100);


Note: store the root in a variable, then edit it. Trying to edit it directly will result in a runtime error. This is a bug.

The following code also works:

    \$"/root".size = Vector2(100,100);


Which is equivalent to:

    get_node("/root").size = Vector2(100,100);


You can also change the size of the window from code like this:

    OS.window_size = Vector2(100,100);

• Thank you! It works great! Feb 16 at 18:07
• Note that if you need additional control (mainly for 3D games when you want crisp UI but low-resolution 3D rendering), you need to use a second Viewport node for the 3D rendering as done in the 3D Viewport Scaling demo. For 2D, the approach described in the answer is fine, except that you may want to add a script to enforce integer scaling for pixel art games. Mar 7 at 13:23
• @jort57 tagging you so you see Calinou comment. I never intended to suggest this answer was the only way to go about it, nor that it would work for all situations, just that it is simpler. Mar 7 at 14:42