Skip to content

Instantly share code, notes, and snippets.

@GOROman
Last active October 7, 2017 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GOROman/baa82c8b8f43c43addefc1f19003bc2c to your computer and use it in GitHub Desktop.
Save GOROman/baa82c8b8f43c43addefc1f19003bc2c to your computer and use it in GitHub Desktop.
[VR] Unity 2017.2系でレンダースケールを変える方法
using UnityEngine;
public class RenderScaleController : MonoBehaviour {
public float renderScale = 2.0f; // デフォルトは1.0 上げれば上げるほどVR内の解像度が高くなる(その分描画は重くなる)
// 起動時に一回だけ設定(動的に変えると描画が壊れる時がある)
void Start () {
UnityEngine.XR.XRSettings.eyeTextureResolutionScale = renderScale;
}
}
@GOROman
Copy link
Author

GOROman commented Oct 7, 2017

レンダースケールを上げることでVR内のバーチャルデスクトップなどを解像度が高くなり
フォントが読みやすくなる。

あえて、思い切り下げて0.1とかやるとガビガビになって効果がわかりやすい。

@GOROman
Copy link
Author

GOROman commented Oct 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment