Rotated Cameras

Jan 28, 2012 at 9:16 PM

Insert these lines into the TestBed

       public float rot = 0;
        protected override void Draw(GameTime gameTime)
            // Create a world view projection matrix to use with krypton
            Matrix world = Matrix.Identity;
            Matrix view = Matrix.CreateTranslation(new Vector3(0, 0, 0) * -1f)*Matrix.CreateRotationZ(rot);

and you will notice that lights get clipped when the camera rotates.

They are completely invisible at every 90degree interval starting at 45 degrees.


Anyone have a solution?

Jan 30, 2012 at 5:44 PM

This is a performance feature. The scissor rectangle is what's causing the clipping.

You have three options:

  1. Remove the line in Krypton where we set the ScissorRect.
  2. Use the version of Krypton that is in the Futures portion of the source code download (it's in the newest version under "Source Code")
  3. Recreate the scissor rectangle to fit the whole light, and nothing but the light.

Option 1 is going to give you a sever performance degredation. (In my experience, at least. Your experience my be different).

Option 3 is the best thing to do.

Option 2 (Krypton.Futures) uses option 3 as it's choice scissor generation tool.

All in all, if you need help implementing it yourself into the current version of krypton, check out Krypton.Futures.