Example #1
0
        public Matrix4 MapSingle(ShadowMapQuality quality, TransformationManager transformation, float angle, float cutoff)
        {
            Camera last = Camera.Current;

            SingleCamera.UpdatePerspective(1, angle, 0.01f, cutoff);
            SingleCamera.Transformation = transformation;
            SingleCamera.Update();
            SingleCamera.Transformation.ClearModifiedFlag();

            Camera.Current = SingleCamera;
            if (quality == ShadowMapQuality.High)
            {
                SpotHighQuality.Use();
            }
            if (quality == ShadowMapQuality.Medium)
            {
                SpotMediumQuality.Use();
            }
            if (quality == ShadowMapQuality.Low)
            {
                SpotLowQuality.Use();
            }

            RenderWorld();

            Camera.Current = last;
            return(SingleCamera.GetVPMatrix());
        }
Example #2
0
 public void UseTextureSingle(ShadowMapQuality quality, int index)
 {
     if (quality == ShadowMapQuality.High)
     {
         SpotHighQuality.UseTexture(index);
     }
     if (quality == ShadowMapQuality.Medium)
     {
         SpotMediumQuality.UseTexture(index);
     }
     if (quality == ShadowMapQuality.Low)
     {
         SpotLowQuality.UseTexture(index);
     }
 }