PageRenderTime 298ms CodeModel.GetById 101ms app.highlight 111ms RepoModel.GetById 80ms app.codeStats 0ms

/Rendering/EffectTests/Effect3DTests.cs

#
C# | 744 lines | 554 code | 55 blank | 135 comment | 13 complexity | 901cd155e19ef150f653808a68145117 MD5 | raw file
  1using Delta.ContentSystem.Rendering;
  2using Delta.ContentSystem.Rendering.Helpers;
  3using Delta.Engine;
  4using Delta.InputSystem;
  5using Delta.Rendering.Basics.Drawing;
  6using Delta.Rendering.Basics.Fonts;
  7using Delta.Rendering.Cameras;
  8using Delta.Rendering.Effects;
  9using Delta.Rendering.Effects.Modifiers;
 10using Delta.Rendering.Enums;
 11using Delta.Rendering.Models;
 12using Delta.Utilities.Datatypes;
 13using Delta.Utilities.Helpers;
 14using Delta.Utilities.Math;
 15using NUnit.Framework;
 16
 17namespace Delta.Rendering.EffectTests
 18{
 19	/// <summary>
 20	/// Effect test in 3D space.
 21	/// </summary>
 22	[Category("Visual")]
 23	internal class Effect3DTests
 24	{
 25		#region Helpers
 26		/// <summary>
 27		/// The default 3d material modifier, so we don't have to write the code
 28		/// in every test again.
 29		/// </summary>
 30		public static readonly MaterialModifier Default3DMaterialModifier =
 31			new MaterialModifier
 32			{
 33				Material = new MaterialColored("DeltaEngineLogo")
 34				{
 35					DrawLayer = RenderLayer.Normal,
 36					BlendColor = Color.White,
 37				},
 38				BillboardMode = BillboardMode.CameraFacingPrecise,
 39			};
 40		#endregion
 41
 42		#region SimpleEffect3D (Static)
 43		/// <summary>
 44		/// Spawn simple effect
 45		/// </summary>
 46		[Test]
 47		public static void SimpleEffect3D()
 48		{
 49			// Create a default camera.
 50			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
 51
 52			// Create a new template.
 53			EffectData data = EffectData.Get("<SimpleEffect3D>");
 54			// Add one emitter and some modifiers.
 55			EmitterData emitter = new EmitterData();
 56			emitter.Modifiers.Add(new AlwaysSpawnModifier());
 57			emitter.Modifiers.Add(Default3DMaterialModifier);
 58			emitter.Modifiers.Add(new RotationModifier
 59			{
 60				Rotation = new Range(0.0f, 360.0f),
 61			});
 62			emitter.Modifiers.Add(new VelocityModifier
 63			{
 64				Velocity = new Vector(0f, 0f, 1f)
 65			});
 66			emitter.Modifiers.Add(new SizeModifier
 67			{
 68				WidthRange = new Range(0.2f, 4f),
 69				HeightRange = new Range(0.1f, 2f),
 70			});
 71			data.Emitters.Add(emitter);
 72			// Spawn the effect.
 73			int effectId = Effect.Spawn(data, Vector.Zero);
 74
 75			// Start the application.
 76			Application.Start(delegate
 77			{
 78				// Draw a grid for orientation.
 79				Grid.Draw();
 80
 81				if (Input.Keyboard.EnterReleased ||
 82				    Input.Touch.TouchReleased)
 83				{
 84					if (effectId == MathHelper.InvalidIndex)
 85					{
 86						effectId = Effect.Spawn(data, Vector.Zero);
 87					}
 88					else
 89					{
 90						Effect.Stop(effectId);
 91						effectId = MathHelper.InvalidIndex;
 92					}
 93				}
 94			});
 95		}
 96		#endregion
 97
 98		#region ElapsingEffect3D (Static)
 99		/// <summary>
100		/// Spawn elapsing effect 3d
101		/// </summary>
102		[Test]
103		public static void ElapsingEffect3D()
104		{
105			// Create a default camera.
106			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
107
108			// Create a new template.
109			EffectData data = EffectData.Get("<ElapsingEffect3D>");
110			// Add an emitter and modifiers.
111			EmitterData emitter = new EmitterData();
112			emitter.Modifiers.Add(new AlwaysSpawnModifier());
113			emitter.Modifiers.Add(Default3DMaterialModifier);
114			emitter.Modifiers.Add(new VelocityModifier
115			{
116				Velocity = new Vector(0f, 0f, 1f)
117			});
118			emitter.Modifiers.Add(new TimeRangeModifier
119			{
120				TimeRange = new Range(0f, 5f),
121			});
122			data.Emitters.Add(emitter);
123			int effectId = Effect.Spawn(data, Vector.Zero);
124
125			// Start the application.
126			Application.Start(delegate
127			{
128				// Draw a grid for orientation.
129				Grid.Draw();
130			});
131		}
132		#endregion
133
134		#region BillboardModeTest (Static)
135		/// <summary>
136		/// Test all the billboard modes.
137		/// </summary>
138		[Test]
139		public static void BillboardModeTest()
140		{
141			// Create a default camera.
142			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
143
144			BillboardMode currentMode = BillboardMode.CameraFacing;
145
146			// Create the new effect template with the first billboard mode.
147			EffectData data = EffectData.Get("<BillboardModeTest>");
148			// Add an emitter and modifiers.
149			EmitterData emitter = new EmitterData();
150			emitter.Modifiers.Add(new AlwaysSpawnModifier());
151			emitter.Modifiers.Add(new SizeModifier
152			{
153				HeightRange = new Range(10),
154				WidthRange = new Range(15),
155			});
156			MaterialModifier materialModifier = Default3DMaterialModifier;
157			materialModifier.BillboardMode = currentMode;
158			emitter.Modifiers.Add(materialModifier);
159			data.Emitters.Add(emitter);
160
161			int effectId = Effect.Spawn(data, Vector.Zero);
162
163			// Start the application.
164			Application.Start(delegate
165			{
166				// Draw a grid for orientation.
167				Grid.Draw();
168				// Show which mode we're currently using.
169				Font.Default.Draw("currentMode=" + currentMode,
170					new Rectangle(0.0f, ScreenSpace.DrawArea.Top, 1.0f,
171						Font.Default.LineHeight));
172
173				// Every time we hit enter or release a touch we want to go to the
174				// next billboard mode for easy debugging of all modes.
175				if (Input.Keyboard.EnterReleased ||
176				    Input.Touch.TouchReleased)
177				{
178					// Go to the next mode
179					currentMode = (BillboardMode)currentMode.Next();
180					// Skip the only2D mode cause this is working in all the 2d tests
181					// anyways.
182					if (currentMode == BillboardMode.Only2D)
183					{
184						currentMode = (BillboardMode)currentMode.Next();
185					}
186
187					// Kill the previous effect if it exists.
188					if (effectId != MathHelper.InvalidIndex)
189					{
190						Effect.Kill(effectId);
191					}
192
193					// Set the current mode and then spawn the new effect.
194					materialModifier.BillboardMode = currentMode;
195					effectId = Effect.Spawn(data, Vector.Zero);
196				}
197			});
198		}
199		#endregion
200
201		#region BillboardModeTestDirect (Static)
202		/// <summary>
203		/// Test all the billboard modes directly over the BillboardManager
204		/// without spawning an effect.
205		/// </summary>
206		[Test]
207		public static void BillboardModeTestDirect()
208		{
209			// Create a default camera.
210			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
211
212			BillboardMode currentMode = BillboardMode.CameraFacing;
213
214			MaterialColored material = new MaterialColored("DeltaEngineLogo")
215			{
216				DrawLayer = RenderLayer.Normal,
217				BlendColor = Color.White,
218				billboardMode = currentMode,
219			};
220
221			// Start the application.
222			Application.Start(delegate
223			{
224				// Draw a grid for orientation.
225				Grid.Draw();
226
227				Application.Window.Title = "currentMode=" + currentMode;
228
229				// Every time we hit enter or release a touch we want to go to the
230				// next billboard mode for easy debugging of all modes.
231				if (Input.Keyboard.EnterReleased ||
232				    Input.Touch.TouchReleased)
233				{
234					// Go to the next mode
235					currentMode = (BillboardMode)currentMode.Next();
236					// Skip the only2D mode cause this is working in all the 2d tests
237					// anyways.
238					if (currentMode == BillboardMode.Only2D)
239					{
240						currentMode = (BillboardMode)currentMode.Next();
241					}
242
243					material.billboardMode = currentMode;
244				}
245
246				BillboardManager.Instance.Draw(material, Vector.Zero,
247					new Size(5, 2.5f), 0f);
248				BillboardManager.Instance.Draw(material, new Vector(0f, -10f, 0f),
249					new Size(5, 2.5f), 0f);
250				BillboardManager.Instance.Draw(material, new Vector(0f, 10f, 0f),
251					new Size(5, 2.5f), 0f);
252			});
253		}
254		#endregion
255
256		#region FountainEffect3D (Static)
257		/// <summary>
258		/// Fountain effect 3D
259		/// 
260		/// </summary>
261		[Test]
262		public static void FountainEffect3D()
263		{
264			// Set up camera
265			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
266
267			// Create a new template.
268			EffectData data = EffectData.Get("<FountainEffect3D>");
269			// Add the emitters and modifiers.
270
271			#region HeadEmitter
272			EmitterData headEmitter = new EmitterData();
273			headEmitter.Modifiers.AddRange(
274				new IEffectModifier[]
275				{
276					new AlwaysSpawnModifier(),
277					new SpawnIntervalModifier
278					{
279						SpawnInterval = 0.4f,
280					},
281					new VelocityModifier
282					{
283						Velocity = new VectorRange(Vector.UnitZ, -Vector.UnitZ),
284					},
285					new SizeModifier
286					{
287						WidthRange = 20f,
288						HeightRange = 20f,
289					},
290					new ParticleLifetimeModifier
291					{
292						ParticleLifetime = 4f,
293					},
294					new RotationModifier
295					{
296						Rotation = new Range(0f, 360f),
297					},
298					new MaterialModifier
299					{
300						Material = new MaterialColored("SmokeSmallAdditive")
301						{
302							BlendColor = new Color(0.3f, 0.4f, 0.8f),
303						},
304						BillboardMode = BillboardMode.CameraFacingPrecise,
305					},
306				});
307			data.Emitters.Add(headEmitter);
308			#endregion
309
310			#region MiddleSurfaceEmitter
311			EmitterData middleSurfaceEmitter = new EmitterData();
312			middleSurfaceEmitter.Modifiers.AddRange(
313				new IEffectModifier[]
314				{
315					new AlwaysSpawnModifier(),
316					new SpawnIntervalModifier
317					{
318						SpawnInterval = 0.3333f,
319					},
320					new SizeModifier
321					{
322						WidthRange = 60f,
323						HeightRange = 60f,
324					},
325					new EmitterOffsetModifier
326					{
327						Offset = new Vector(0f, 0f, -1f),
328					},
329					new MaterialModifier
330					{
331						Material = new MaterialColored("SmokeSmallAdditive")
332						{
333							BlendColor = new Color(0.3f, 0.4f, 0.8f),
334						},
335						BillboardMode = BillboardMode.Ground,
336					},
337				});
338			data.Emitters.Add(middleSurfaceEmitter);
339			#endregion
340
341			#region BottomSurfaceEmitter
342			EmitterData bottomSurfaceEmitter = new EmitterData();
343			bottomSurfaceEmitter.Modifiers.AddRange(
344				new IEffectModifier[]
345				{
346					new AlwaysSpawnModifier(),
347					new SpawnIntervalModifier
348					{
349						SpawnInterval = 0.3333f,
350					},
351					new SizeModifier
352					{
353						WidthRange = 150f,
354						HeightRange = 150f,
355					},
356					new EmitterOffsetModifier
357					{
358						Offset = new Vector(0f, 0f, -4f),
359					},
360					new MaterialModifier
361					{
362						Material = new MaterialColored("SmokeSmallAdditive")
363						{
364							BlendColor = new Color(0.3f, 0.4f, 0.8f),
365						},
366						BillboardMode = BillboardMode.Ground,
367					},
368				});
369			data.Emitters.Add(bottomSurfaceEmitter);
370			#endregion
371
372			Effect.Spawn(data, new Vector(0.0f, 0.0f, 4.5f));
373
374			Matrix mat = Matrix.CreateScale(0.45f);
375
376			Application.BackgroundColor = Color.Black;
377			// Start the application.
378			Application.Start(delegate
379			{
380				// Draw a grid for orientation and the fountain for the visual.
381				Grid.Draw();
382			});
383		}
384		#endregion
385
386		#region SmokeEffect3D (Static)
387		/// <summary>
388		/// Smoke effect 3D
389		/// </summary>
390		[Test]
391		public static void SmokeEffect3D()
392		{
393			// Set up camera
394			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
395
396			// Create a new template.
397			EffectData data = EffectData.Get("<SmokeEffect3D>");
398			// Add an emitter and modifiers.
399			EmitterData emitter = new EmitterData();
400			emitter.Modifiers.Add(new SpawnIntervalModifier
401			{
402				SpawnInterval = 0.05f,
403			});
404			emitter.Modifiers.Add(new ParticleLifetimeModifier
405			{
406				ParticleLifetime = 7f
407			});
408			emitter.Modifiers.Add(new TimeRangeModifier
409			{
410				TimeRange = new Range(0f, float.PositiveInfinity),
411			});
412			Graph alphaGraph = new Graph();
413			alphaGraph.Add(0f, 0f);
414			alphaGraph.Add(0.2f, 1f);
415			alphaGraph.Add(0.8f, 1f);
416			alphaGraph.Add(1f, 0f);
417			emitter.Modifiers.Add(new FadeModifier
418			{
419				AdvancedAlphaFade = alphaGraph,
420			});
421			emitter.Modifiers.Add(new MaterialModifier
422			{
423				Material = new MaterialColored("SmokeAdditive"),
424				BillboardMode = BillboardMode.CameraFacingPrecise
425			});
426			emitter.Modifiers.Add(new SizeModifier
427			{
428				WidthRange = new Range(10f, 12f),
429				HeightRange = new Range(10f, 12f),
430			});
431			emitter.Modifiers.Add(new RandomVelocityModifier
432			{
433				MinVelocity = new Vector(-0.1f, -0.3f, 0.4f),
434				MaxVelocity = new Vector(0.3f, 0.3f, 0.4f),
435			});
436			data.Emitters.Add(emitter);
437			Effect.Spawn(data, Vector.Zero);
438
439			// Start the application.
440			Application.Start(delegate
441			{
442				// Draw a grid for orientation.
443				Grid.Draw();
444			});
445		}
446		#endregion
447
448		#region GroundMistEffect3D (Static)
449		/// <summary>
450		/// Mist effect 3D
451		/// </summary>
452		[Test]
453		public static void GroundMistEffect3D()
454		{
455			// Set up camera
456			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
457
458			// Create a new template.
459			EffectData data = EffectData.Get("<GroundMistEffect3D>");
460			// Add an emitter and modifiers.
461			EmitterData emitter = new EmitterData();
462			emitter.Modifiers.Add(new SpawnIntervalModifier
463			{
464				SpawnInterval = 0.1f,
465			});
466			emitter.Modifiers.Add(new ParticleLifetimeModifier
467			{
468				ParticleLifetime = 5f,
469			});
470			emitter.Modifiers.Add(new TimeRangeModifier
471			{
472				TimeRange = new Range(0f, float.PositiveInfinity),
473			});
474			Graph alphaGraph = new Graph();
475			alphaGraph.Add(0f, 0f);
476			alphaGraph.Add(0.5f, 0.4f);
477			alphaGraph.Add(1f, 0f);
478			emitter.Modifiers.Add(new FadeModifier
479			{
480				AdvancedAlphaFade = alphaGraph,
481			});
482			emitter.Modifiers.Add(new MaterialModifier
483			{
484				Material = new MaterialColored("SmokeAdditive")
485				{
486					BlendColor = new Color(1f, 1f, 1f),
487				},
488				BillboardMode = BillboardMode.Ground,
489			});
490			emitter.Modifiers.Add(new RandomVelocityModifier
491			{
492				MinVelocity = new Vector(-0.2f, -0.2f, 0f),
493				MaxVelocity = new Vector(0.2f, 0.2f, 0f),
494			});
495			emitter.Modifiers.Add(new RandomSpawnOffsetModifier
496			{
497				MinOffset = new Vector(-5f, -5f, -0.1f),
498				MaxOffset = new Vector(5f, 5f, 0.1f),
499			});
500			emitter.Modifiers.Add(new SizeModifier
501			{
502				WidthRange = new Range(20f, 25f),
503				HeightRange = new Range(20f, 25f),
504			});
505			data.Emitters.Add(emitter);
506			Effect.Spawn(data, new Vector(0.0f, 0.0f, 0.2f));
507
508			MaterialColored planeMat = new MaterialColored(
509				"InnerGroundBestHighMediumLowDiffuse");
510
511			// Start the application.
512			Application.Start(delegate
513			{
514				// Draw a sky and a plane for orientation.
515				Sky.Draw();
516				BillboardManager.Instance.DrawPlane(planeMat);
517			});
518		}
519		#endregion
520
521		#region SwordClashEffect3D (Static)
522		/// <summary>
523		/// Sword clash effect 3D
524		/// </summary>
525		[Test]
526		public static void SwordClashEffect3D()
527		{
528			// Set up camera
529			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
530
531			// Create a new template.
532			EffectData data = EffectData.Get("<SwordClashEffect3D>");
533			// Add an emitter and modifiers.
534			EmitterData emitter = new EmitterData();
535			emitter.Modifiers.Add(new SpawnOnceModifier());
536			emitter.Modifiers.Add(new ParticleLifetimeModifier
537			{
538				ParticleLifetime = 0.1f,
539			});
540			emitter.Modifiers.Add(new MaterialModifier
541			{
542				Material = new MaterialColored("WaterSplatterAdditive")
543				{
544					BlendColor = new Color(0.6f, 0.6f, 0.2f),
545				},
546				BillboardMode = BillboardMode.CameraFacingPrecise,
547			});
548			emitter.Modifiers.Add(new VelocityModifier
549			{
550				Velocity = new VectorRange(new Vector(-0.5f, -0.5f, 0f),
551					new Vector(0.5f, 0.5f, 0f)),
552			});
553			emitter.Modifiers.Add(new SizeModifier
554			{
555				WidthRange = new Range(3f, 10f),
556				HeightRange = new Range(3f, 10f),
557			});
558			emitter.Modifiers.Add(new RotationModifier
559			{
560				Rotation = new Range(0f, 360f),
561			});
562			data.Emitters.Add(emitter);
563
564			// Start the application.
565			Application.Start(delegate
566			{
567				// Draw a grid for orientation.
568				Grid.Draw();
569				if (Input.Keyboard.EnterReleased)
570				{
571					Effect.Spawn(data, new Vector(0.0f, 0.0f, 0.1f));
572				}
573			});
574		}
575		#endregion
576
577		#region FireEffect3D (Static)
578		/// <summary>
579		/// Fire effect 3D
580		/// </summary>
581		[Test]
582		public static void FireEffect3D()
583		{
584			// Set up camera
585			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
586
587			// Create a new template.
588			EffectData data = EffectData.Get("<FireEffect3D>");
589
590			// Add emitters and modifiers.
591			EmitterData emitter = new EmitterData();
592			emitter.Modifiers.Add(new SpawnIntervalModifier
593			{
594				SpawnInterval = 0.05f,
595			});
596			emitter.Modifiers.Add(new ParticleLifetimeModifier
597			{
598				ParticleLifetime = 1.2f
599			});
600			emitter.Modifiers.Add(new TimeRangeModifier
601			{
602				TimeRange = new Range(0f, float.PositiveInfinity),
603			});
604			Graph alphaFade = new Graph();
605			alphaFade.Add(0f, 0f);
606			alphaFade.Add(0.2f, 1f);
607			alphaFade.Add(0.8f, 1f);
608			alphaFade.Add(1f, 0f);
609			emitter.Modifiers.Add(new FadeModifier
610			{
611				AdvancedAlphaFade = alphaFade,
612			});
613			emitter.Modifiers.Add(new SizeModifier
614			{
615				WidthRange = new Range(10f, 0.05f),
616				HeightRange = new Range(10f, 0.05f),
617			});
618			emitter.Modifiers.Add(new MaterialModifier
619			{
620				Material = new MaterialColored("SmokeAdditive")
621				{
622					BlendColor = new Color(0.6f, 0.3f, 0f),
623				},
624				BillboardMode = BillboardMode.CameraFacingPrecise,
625			});
626			emitter.Modifiers.Add(new RandomSpawnOffsetModifier
627			{
628				MinOffset = new Vector(-0.05f, -0.05f, 0f),
629				MaxOffset = new Vector(0.05f, 0.05f, 0f),
630			});
631			emitter.Modifiers.Add(new RandomVelocityModifier
632			{
633				MinVelocity = new Vector(-0.1f, -0.1f, 1f),
634				MaxVelocity = new Vector(0.1f, 0.1f, 1f),
635			});
636			data.Emitters.Add(emitter);
637
638			Effect.Spawn(data, Vector.Zero);
639
640			// Start the application.
641			Application.Start(delegate
642			{
643				// Draw a grid for orientation.
644				Grid.Draw();
645			});
646		}
647		#endregion
648
649		#region BloodSplatterEffect3D (Static)
650		/// <summary>
651		/// Blood splatter effect 3D
652		/// </summary>
653		[Test]
654		public static void BloodSplatterEffect3D()
655		{
656			// Set up camera
657			LookAtCamera cam = new LookAtCamera(new Vector(1, -5, 3));
658
659			// Create a new template.
660			EffectData data = EffectData.Get("<BloodSplatterEffect3D>");
661			// Add an emitter and modifiers.
662			EmitterData emitter = new EmitterData();
663			emitter.Modifiers.Add(new SpawnOnceModifier());
664			emitter.Modifiers.Add(new ParticleLifetimeModifier
665			{
666				ParticleLifetime = 0.5f,
667			});
668			emitter.Modifiers.Add(new MaterialModifier
669			{
670				Material = new MaterialColored("BloodPoints")
671				{
672					BlendColor = new Color(0.6f, 0.6f, 0.2f),
673				},
674				BillboardMode = BillboardMode.CameraFacingPrecise,
675			});
676			emitter.Modifiers.Add(new VelocityModifier
677			{
678				Velocity = new VectorRange(new Vector(-0.5f, -0.5f, 0f),
679					new Vector(0.5f, 0.5f, 0f)),
680			});
681			emitter.Modifiers.Add(new SizeModifier
682			{
683				WidthRange = new Range(3f, 10f),
684				HeightRange = new Range(3f, 10f),
685			});
686			emitter.Modifiers.Add(new RotationModifier
687			{
688				Rotation = new Range(0f, 180f),
689			});
690			data.Emitters.Add(emitter);
691
692			// Start the application.
693			Application.Start(delegate
694			{
695				// Draw a grid for orientation.
696				Grid.Draw();
697				if (Input.Keyboard.EnterReleased)
698				{
699					// Spawn the effect.
700					Effect.Spawn(data, new Vector(0.0f, 0.0f, 0.1f));
701				}
702			});
703		}
704		#endregion
705
706		///// <summary>
707		///// Lens flare effect 3D, together with a sun
708		///// </summary>
709		//public static void LensFlareEffect3D()
710		//{
711		//  // Set up camera
712		//  LookAtCamera cam = new LookAtCamera(new Vector(-2, -5, -5));
713
714		//  // Sun position taken from max scene.
715		//  // Skydome needs to be changed to fit it. Note: Is changed now!
716		//  Light.Direction = Light.SoulcraftTechDemoLightDirection;
717		//  Light.Direction.Normalize();
718
719		//  // Setup Lens Flare effect
720		//  LensFlareEffect effect = new LensFlareEffect("LensFlareEffect",
721		//    new Material2DColored("PentagonAdditive"),
722		//    new Material2DColored("LensflareETransparency"));
723		//  // Setup Glare effect
724		//  effect.GlareMaterial = new Material2DColored("SunBlendAdditive");
725		//  // And activate it
726		//  effect.Activate();
727
728		//  Application.Start(delegate
729		//  {
730		//    Sky.Draw();
731		//    Grid.Draw();
732
733		//    // Calculate positions for debug (same math as in LensFlareEffect)
734		//    Vector sunPosition =
735		//    Light.GetLightPosition(ScreenSpace.ViewInverse.Translation, 50.0f);
736		//    Vector sunScreenPosition = ScreenSpace.Project(sunPosition);
737		//    Font infoFont = Font.Default;
738		//    float yPos = ScreenSpace.Area.Top + infoFont.LineHeight;
739		//    infoFont.Write(new Point(0.5f, yPos),
740		//      "SunScreenPosition= " + sunScreenPosition);
741		//  });
742		//}
743	}
744}