Problems with rendering - only getting darker colors

Oct 17, 2011 at 1:12 PM
Edited Oct 17, 2011 at 1:13 PM

Hi

Im having some problems with rendering. With Krypton turned on my sprites just gets a bit darker. Thats all. See picture. (Rightside is with Krypton)

Here is how I initalize it:

[code]this.ke = new Krypton.KryptonEngine(game, "KryptonEffect");
            ke.AmbientColor = new Color(0, 0, 0);
            ke.CullMode = CullMode.None;
            ke.Matrix = Matrix.CreateOrthographic(game.Window.ClientBounds.Width, game.Window.ClientBounds.Height, 0.1f, 250.0f);
            ke.Initialize();[/code]

Then I add a light:

[code]light.Light = new Krypton.Lights.Light2D();
            light.Light.Angle = 360;
            light.Light.Color = Color.White;
            light.Light.Intensity = 1.0f;
            light.Light.IsOn = true;
            light.Light.Position = new Vector2(0, 0);
            light.Light.Range = 40;
            light.Light.Texture = ContentManager.Load<Texture2D>("1304455009901");
            ke.Lights.Add(light.Light);[/code]

 

And here is my render

[code]

this.ke.LightMapPrepare();
            this.ke.Update(time);
            this.ke.Draw(time);

[/code]

 

Any help would be great!

Oct 18, 2011 at 8:12 AM
Edited Oct 18, 2011 at 9:44 AM

Okey, nevermind me - forgot to clear the buffer, add a light texture, and plenty more..

 

Edit:

Nevermind, after I tried to add it into my engine I get the same problem except now I can only see a black screen..

Coordinator
Oct 21, 2011 at 7:10 PM

Interesting...

Have you tried centering the light in the scene, and targeting the center of the scene with your camera (if you're using one)? There may be some scaling issues, and having an offset with exaggerate that.

Also, let me know if changing Krypton's CullMode helps out any.