Revert PAR

This commit is contained in:
2026-10-29 22:36:04 -07:00
parent d4a70b7882
commit 93e91a68d5
5 changed files with 6 additions and 80 deletions

View File

@ -62,20 +62,7 @@ class CameraObject extends Object {
public function buildProjection(screenAspect: Null<Float> = null) {
if (data.raw.ortho != null) {
var left = data.raw.ortho[0];
var right = data.raw.ortho[1];
var bottom = data.raw.ortho[2];
var top = data.raw.ortho[3];
if (data.raw.aspect != null) {
var aspect: kha.FastFloat = data.raw.aspect;
if (screenAspect == null) screenAspect = iron.App.w() / iron.App.h();
var scale = aspect / screenAspect;
var cx = (left + right) * 0.5;
var hw = (right - left) * 0.5 * scale;
left = cx - hw;
right = cx + hw;
}
P = Mat4.ortho(left, right, bottom, top, data.raw.near_plane, data.raw.far_plane);
P = Mat4.ortho(data.raw.ortho[0], data.raw.ortho[1], data.raw.ortho[2], data.raw.ortho[3], data.raw.near_plane, data.raw.far_plane);
}
else {
if (screenAspect == null) screenAspect = iron.App.w() / iron.App.h();