Fixed quad height

This commit is contained in:
misabiko 2022-05-15 11:54:02 -04:00
parent f6fd5798b2
commit 57c9a8f643
2 changed files with 3 additions and 3 deletions

View File

@ -3183,8 +3183,8 @@ MonoBehaviour:
renderQuad: {fileID: 2080936950}
material: {fileID: 0}
layer: 9
tabWidth: 0.05
quadOffset: 0.87
tabWidth: 0.2
quadOffset: 1
--- !u!1 &1385339222
GameObject:
m_ObjectHideFlags: 0

View File

@ -148,7 +148,7 @@ struct WorldInfo {
if (usingTexture)
camera.targetTexture = null;
float height = 2f * Mathf.Atan(Mathf.Deg2Rad * camera.fieldOfView) * quadOffset;
float height = 2f * Mathf.Tan(Mathf.Deg2Rad * camera.fieldOfView / 2f) * quadOffset;
renderQuad.localScale = new Vector3(camera.aspect * height, height, 1f);
texture = new RenderTexture(Screen.width, Screen.height, 32);
material.SetTexture(CameraTexture, texture);