public void PreRenderMono(ProjectorEyes eyes) { Vector3[] plane = TransformPlane(); if (transform.hasChanged) { Projection.HolographicFastPrecompute(plane[3], plane[2], plane[0], ref vr, ref vu, ref vn); } Matrix4x4 holographic = Projection.HolographicFast(plane[3], plane[2], plane[0], this.vr, this.vu, this.vn, eyes.Anchor(), this.cam.nearClipPlane, this.cam.farClipPlane); this.cam.projectionMatrix = this.equalization * holographic; }
public void PreRenderStereo(ProjectorEyes eyes) { Vector3[] plane = TransformPlane(); if (transform.hasChanged) { Projection.HolographicFastPrecompute(plane[3], plane[2], plane[0], ref vr, ref vu, ref vn); } Matrix4x4 holographicLeft = Projection.HolographicFast(plane[3], plane[2], plane[0], vr, vu, vn, eyes.Left(this.invert), this.cam.nearClipPlane, this.cam.farClipPlane); Matrix4x4 holographicRight = Projection.HolographicFast(plane[3], plane[2], plane[0], vr, vu, vn, eyes.Right(this.invert), this.cam.nearClipPlane, this.cam.farClipPlane); this.cam.SetStereoProjectionMatrix(Camera.StereoscopicEye.Left, this.equalization * holographicLeft); this.cam.SetStereoProjectionMatrix(Camera.StereoscopicEye.Right, this.equalization * holographicRight); }
public void SetRenderTargets(ProjectorEyes eyes, ProjectorEmitter[] emitters) { this.eyes = eyes; this.emitters = emitters; }
public void Awake() { this.eyes = base.GetComponentInChildren <ProjectorEyes>(); this.mount = base.GetComponentInChildren <ProjectorMount>(); this.emitters = this.mount.GetOrdered(); }
public void OnEnable() { this.me = (ProjectorEyes)base.target; this.brain = null; }