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