Exemplo n.º 1
0
 public Split(float size) {
     Size = size;
     Buffer = TargetResourceDepthTexture.Create();
     Camera = new CameraOrthoShadow {
         NearZ = 0.1f,
         FarZ = ClipDistance * 2f,
         Width = size,
         Height = size
     };
     Camera.SetLens(1f);
 }
Exemplo n.º 2
0
            public void Update(float size, float clipDistance)
            {
                if (Camera != null && Equals(size, Size) && Equals(ClipDistance, clipDistance))
                {
                    return;
                }

                Size         = size;
                ClipDistance = clipDistance;

                Camera = new CameraOrthoShadow {
                    NearZ  = 1f,
                    FarZ   = ClipDistance * 2f,
                    Width  = size,
                    Height = size
                };

                Camera.SetLens(1f);
            }