Adjustments to znear loading

This commit is contained in:
KillzXGaming 2022-10-22 11:05:33 -04:00
parent 94d7ab3bb1
commit a135be0615

View file

@ -92,7 +92,7 @@ namespace Toolbox.Library
break;
case "CameraNear":
float.TryParse(node.InnerText, out Runtime.CameraNear);
Runtime.CameraNear = (float)Math.Max(Math.Min(0.1, Runtime.CameraNear), 1.0f);
Runtime.CameraNear = (float)Math.Min(Math.Max(0.1, Runtime.CameraNear), 1.0f);
break;
case "PreviewScale":
float.TryParse(node.InnerText, out Runtime.previewScale);