Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public void SetRenderTargets(ProjectorEyes eyes, ProjectorEmitter[] emitters)
 {
     this.eyes     = eyes;
     this.emitters = emitters;
 }
Esempio n. 4
0
 public void Awake()
 {
     this.eyes     = base.GetComponentInChildren <ProjectorEyes>();
     this.mount    = base.GetComponentInChildren <ProjectorMount>();
     this.emitters = this.mount.GetOrdered();
 }
Esempio n. 5
0
 public void OnEnable()
 {
     this.me    = (ProjectorEyes)base.target;
     this.brain = null;
 }