PageSourceSearch

https://yunhan.li/unity/2019/05/31/unity-oculus-standalone-graphic.html

html yunhan.li collected 2026-09-28 07:13:50 UTC 7,353 bytes, 192 lines download raw bytes

1<!DOCTYPE html>
2<html>
3
4  <head>
5    <meta charset="utf-8">
6    <meta name="viewport" content="width=device-width initial-scale=1" />
7    <meta http-equiv="X-UA-Compatible" content="IE=edge">
8    <title>Yunhan > 4 Steps to Improve the Graphic Quality for Oculus Quest/Go App in Unity</title>
9    <meta name="description" content="记录一些关于各种的小知识。 Learn and Share.
10">
11    <meta name="keywords" content="Unity, Virtual Reality, VR, Oculus, Oculus Go, Oculus Quest, Graphic">
12    <meta name="author" content="Yunhan">
13    <link rel="shortcut icon" href="/img/favicon.ico">
14    <!--Bootstrap-->
15    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
16    <link rel="stylesheet" href="/css/main.css">
17    <link rel="canonical" href="http://yunhan0.github.io/unity/2019/05/31/unity-oculus-standalone-graphic.html">
18    <!--JQuery-->
19    
19<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
19
20    <!-- Include all compiled plugins (below), or include individual files as needed -->
21    
21<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
21
22    <!--Google Analysis-->
23    
23<script>
vendor: 364 bytes, lines 23-28
23
24      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
25      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
26      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
27      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
28      ga('create', '
28UA-96539119-1
vendor: 46 bytes, lines 28-30
28', 'auto');
29      ga('send', 'pageview');
30    
30</script>
30
31</head>
32
33
34  <body>
35
36    <nav class="nav-wrap">
37  <ul class="list-unstyled list-inline">
38  
39    
40  
41    
42      <li>
43        <a class="page-link" href="/">BLOG</a>
44      </li>
45    
46  
47    
48  
49    
50      <li>
51        <a class="page-link" href="/about/">ABOUT</a>
52      </li>
53    
54  
55    
56      
57  </ul>
58</nav>
59
60<header class="site-header">
61  <p class="title">
62     Yunhan
63  </p>
64</header>
65
66
67
68    <div class="page-content">
69      <div class="wrapper">
70        <p class="small">
71  <span> <a href="/">Home</a> </span>
72  <span class="text-muted">&nbsp;&gt; 4 Steps to Improve the Graphic Quality for Oculus Quest/Go App in Unity </span>
73</p>
74
75<div class="post">
76  <div class="post-header">
77    <h1 class="post-title">4 Steps to Improve the Graphic Quality for Oculus Quest/Go App in Unity</h1>
78    <p class="post-meta">May 31, 2019</p>
79  </div>
80
81  <article class="post-content">
82    <p>Building an Oculus Go/Quest App in Unity for the first time, many people probably experience the jaggy graphic quality.
83I’ve been asked frequently how to make the UI crystal clear in Oculus Go/Quest app. In this blog,
84I will demonstrate 4 steps to dramatically increase your graphic quality for Oculus Go/Quest app in Unity.
85<!--more--></p>
86
87<h3 id="steps">Steps</h3>
88<ol>
89  <li>
90    <p><b>Step 1.</b> <br />
91Increase <b>XRSettings.eyeTextureResolutionScale</b> for better graphics. This property controls the actual size of eye textures as a multiplier of the device’s default resolution[1].<br />
92You can create a following script named VRRenderScale.cs and attach it to any game object in your scene. The higher render scale value, the better visual effect you get. However, <b> Remember: </b> This will tradeoff the  performance. Usually, I set it to 1.5 because it could dramatically increase the graphic quality.<br /></p>
93
94    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>using UnityEngine;
95using UnityEngine.XR;
96
97public class VRRenderScale : MonoBehaviour {
98    void Start () {
99        XRSettings.eyeTextureResolutionScale = 1.5f;
100    }
101}
102</code></pre></div>    </div>
103  </li>
104  <li>
105    <p><b>Step 2.</b> <br />
106Set your VR camera to <b>Forward Rendering</b> and <b>Allow MSAA</b>. Also, in Quality Setting, set 2x(or 4x) <a href="https://www.webopedia.com/TERM/A/antialiasing.html">anti-aliasing</a> for better visual quality.</p>
107  </li>
108  <li>
109    <p><b>Step 3.</b> <br />
110In your Quality Setting, <b>turn VSync(Vertical Synchronization) off</b>. Why tick VSync off? Here is some background information about VSync. <br />
111First, you will need to know the difference between Frame rate and Refresh rate.</p>
112
113    <ul>
114      <li>The frame rate is determined by how powerful your CPU or GPU is.</li>
115      <li>Refresh rate is determined by your monitor, ie, the number of times per second your monitor can redraw the screen[2].</li>
116    </ul>
117
118    <p>Say, for your Oculus VR game, you run 90FPS, while if your refresh rate is lower than your frame rate, you will experience screen tearing. Vertical Synchronization is helpful to prevent Screen Tearing because it forces your frame rate the same as the refresh rate. <br />
119The best practice is to turn VSync off and enable it <b>only if</b> you experience screen tearing. Because by ticking it off, your performance would dramatically change.</p>
120  </li>
121  <li>
122    <p><b>Step 4 (Optional).</b> <br />
123If you have any Text and you found it isn’t clear in VR, you can either
124a) use <a href="https://www.assetstore.unity3d.com/en/#!/content/84126">TextMesh Pro</a> <br />
125<b>or</b><br />
126b) To achieve free anti-aliasing on text for VR: Use Canvas Scaler on a Worldspace Canvas. The UI should have a “Reference Pixels Per Unit” setting of 1, then alter “Dynamic Pixels Per Unit” until you slightly soften the edges of the text.[3]
127  <img src="/img/assets/unity-canvas-antialiasing.png" style="width:100%;max-width:400px;" /></p>
128  </li>
129</ol>
130
131<h3 id="reference">Reference</h3>
132<ol>
133  <li><a href="https://docs.unity3d.com/ScriptReference/XR.XRSettings-eyeTextureResolutionScale.html">Render Scale</a><br /></li>
134  <li><a href="http://www.avadirect.com/blog/frame-rate-fps-vs-hz-refresh-rate/">Frame Rate Versus Refresh Rate</a></li>
135  <li><a href="https://learn.unity.com/tutorial/vr-best-practice#5c7f8528edbc2a002053b44f">User Interfaces for VR</a></li>
136</ol>
137
138  </article>
139</div>
140
141      </div>
142    </div>
143    
144    <footer class="site-footer">
145  <div class="container-fluid inner">
146    <div class="row">
147      <div class="col-xs-12 col-sm-3">Yunhan</div>
148      <div class="col-xs-12 col-sm-3">记录一些关于各种的小知识。 Learn and Share.
149</div>
150      <div class="col-xs-12 col-sm-3">
151        <ul class="list-unstyled">            
152          <li>
153            <a href="https://www.zhihu.com/people/yunhan0" target="_blank">
154            知乎
155            </a>
156            (@韵涵)
157          </li>
158          <li>
159            <a href="https://github.com/yunhan0" target="_blank">
160            Github
161            </a> 
162            (@yunhan0)
163          </li>
164          <li>
165            <a href="https://au.linkedin.com/in/yunhan0" target="_blank">
166            Linkedin
167            </a> 
168            (@yunhan0)
169          </li>
170          <li>
171            <a href="https://twitter.com/yunhan0" target="_blank">
172            Twitter
173            </a> 
174            (@yunhan0)
175          </li>
176          <li>
177            <a href="mailto:[email protected]">
178            Email
179            </a>
180            ([email protected])
181          </li>               
182        </ul>
183      </div>
184      <div class="col-xs-12 col-sm-3">&copy; copyright 2017-2025 Yunhan Li. </div>
185    </div>
186  </div>   
187</footer>
188
189
190  </body>
191
192</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.