Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by RetnuhStudio · Jan 08, 2014 at 07:21 AM · resolutionrender

How to render at half resolution?

Does unity support rendering at a different resolution to the screen or window resolution? eg: Having a window resolution of 1280x720 and rendering 50% of that (640x360) then up-scaling it back to 1280x720.

Ive tried achieving this with a render texture and drawing it to the GUI but am still learning about them and was just wondering if there was a more direct approach.

Regards - Matt

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by GameVortex · Jan 08, 2014 at 09:47 AM

Unity has no specific support for rendering at a different resolution than the screen size, so your solution with using a render textures is the way to go most likely. One problem there is that render textures has a resolution in the power of two by default and you must make the render texture from script to have the specific resolution you want (as described in the script reference **here**).

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image RetnuhStudio · Jan 08, 2014 at 10:06 AM 0
Share

Ah ok, yea I am creating my render textures via script at the moment. O well, Cheers for the reply.

avatar image GameVortex · Jan 08, 2014 at 10:42 AM 0
Share

No problem. =) If it answered your question, please mark it as answered so it will be removed from the Unanswered section.

avatar image
0

Answer by daveinpublic · Apr 12, 2018 at 02:14 AM

https://docs.unity3d.com/ScriptReference/Screen.SetResolution.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Ruhan-_- · May 11, 2021 at 05:59 AM

This thread is old, but the correct answer is Screen.SetResolution https://docs.unity3d.com/ScriptReference/Screen.SetResolution.html not sure if the API existed back in 2014 when the original accepted answer was written.

A good idea is to use it with Screen.currentResolution.width and Screen.currentResolution.height

 private void Awake()
 {
         float fraction = 0.5f; // Render at half the resolution of current screen
         Screen.SetResolution( ( int ) (Screen.currentResolution.width * fraction), ( int ) (Screen.currentResolution.height * fraction), true, 60);
 }

To reduce, simply change the value of the "fraction" variable. Even 0.8f for fraction gives a pretty good performance rise in most cases, especially if your device is fill rate bound like most low end mobile devices.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can I create a 64x64 resolution 3D game in Unity? 2 Answers

Rendering to a cubemap: resolution limitation? 1 Answer

Is it possible to create pixaleted 3d game? 1 Answer

How to make my game fit into my droid? 1 Answer

scaling a UI plane to match screen size 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges