Example #1
0
		protected override void OnInitialize()
		{
			base.OnInitialize();

			this.BackgroundColor = new Color4(0, 0, 0, 0);

			m_View = new View3D(WindowWidth, WindowHeight, (float)Math.PI / 4, 1f);			

			m_Splash = new SplashScreen();			

			m_Splash.Initialize();

			m_Scene = new ExperimentScene();
			m_Imposter = new Imposter(WindowWidth, WindowHeight, Format.R16G16B16A16_Float, new Color4(0f, 0f, 0f, 0f), ImposterOverlayType.None);
			m_BrightPassView = new BrightPassView(WindowWidth / 2, WindowHeight / 2, Format.R16G16B16A16_Float, new Color4(0f, 0f, 0f, 0f), ImposterOverlayType.None_BrightPass);
			m_Bloom = new BloomChain(WindowWidth / 2, WindowHeight / 2, Format.R16G16B16A16_Float);

			m_Splash.IsVisible = true;

			m_ScreenCapture = new ScreenCapture();

			if (m_Splash.IsVisible == false)
			{ 
				Cursor.Hide();
			}			
		}
Example #2
0
		//private float m_HeightScale = 1.4f; 

		// private int m
		public SimulationScene()
		{
            m_Particles = new ParticleRender2(RugTech1.Helper.ResolvePath("~/Assets/particle2.png"), ArtworkStaticObjects.Ensemble.MaxNumberOfParticles);
			m_Particles.ColorScale = 1f;
			m_Particles.ParticleScale = 0.01f;
			m_Particles.MinDistance = 0;
			m_Particles.MaxDistance = 1000;
			m_Points = new StarInstanceVertex[m_Particles.MaxCount]; 
			m_Composite = new CompositeFieldImageCS();
			m_WarpGrid = new WarpGrid();
			m_WarpGrid.FeedbackLevel = 0.99f;

			m_FeedbackImposters[0] = new Imposter(GameConfiguration.WindowWidth, GameConfiguration.WindowHeight, Format.R16G16B16A16_Float, new Color4(0f, 0f, 0f, 0f), ImposterOverlayType.Add);
			m_FeedbackImposters[1] = new Imposter(GameConfiguration.WindowWidth, GameConfiguration.WindowHeight, Format.R16G16B16A16_Float, new Color4(0f, 0f, 0f, 0f), ImposterOverlayType.Add);

			m_FeedbackScene = new FeedbackScene();
			m_FeedbackScene.Grid = m_WarpGrid;
			m_FeedbackScene.Particles = m_Particles;
			m_FeedbackScene.Composite = m_Composite;

			m_RenderContext = new RenderContext(ArtworkStaticObjects.CompositeFieldImage.Width, ArtworkStaticObjects.CompositeFieldImage.Height);

			m_TargetBox = new ImageBox(null);
		}