daily pastebin goal
82%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public override void Draw(GameTime gameTime)
  2.         {
  3.             if ((DateTime.Now - lastSec).Seconds > 0)
  4.             {
  5.                 fps = fpsCounter;
  6.                 fpsCounter = 0;
  7.                 lastSec = DateTime.Now;
  8.             }
  9.             fpsCounter++;
  10.             EleniLib.Graphics.Renderer.setView(EleniLib.Graphics.Renderer.Camera);
  11.             testFrustum = new BoundingFrustum(EleniLib.Graphics.Renderer.ViewMatrix * EleniLib.Graphics.Renderer.ProjectionMatrix);
  12.             hm.Render(testFrustum);
  13.             Renderer.Render(testSprite);
  14.             Renderer.Render(ball);
  15.             rc.Draw();
  16.             _modelBatch.DrawModel(model);
  17.             _modelBatch.Draw();
  18.  
  19.             EleniLib.Graphics.Light.LightManager.DrawLights();
  20.            
  21.             /*EleniLib.Graphics.Renderer.setDeferredStage(EleniLib.Graphics.DeferredPhase.None);
  22.             _effect.SetParameter(EleniLib.Graphics.EffectParameter.Texture, "lightMap", EleniLib.Graphics.Renderer.sceneMap);
  23.             _effect.SetTechnique("Combine");
  24.             EleniLib.Graphics.Renderer.GraphicsDevice.Clear(Color.Black);
  25.             EleniLib.Graphics.Renderer.SetScreenQuad();
  26.             EleniLib.Graphics.Renderer.Render(_effect);
  27.             */
  28.             EleniLib.Graphics.Renderer.setRenderStage(DeferredPhase.None);
  29.             Camera reflectionCam = hm.WaterPlane.reflectionCam(Renderer.Camera);
  30.             EleniLib.Graphics.Renderer.setRenderStage(DeferredPhase.Reflection);
  31.             EleniLib.Graphics.Renderer.setView(reflectionCam);
  32.             testFrustum = new BoundingFrustum(EleniLib.Graphics.Renderer.ViewMatrix * EleniLib.Graphics.Renderer.ProjectionMatrix);
  33.             hm.RenderForward(testFrustum);
  34.  
  35.             _modelBatch.DrawModel(model);
  36.             _modelBatch.DrawReflection();
  37.             skyCube.Draw(reflectionCam);
  38.  
  39.             EleniLib.Graphics.Renderer.setRenderStage(DeferredPhase.Final);
  40.             //EleniLib.Graphics.Renderer.Draw(Vector2.Zero, Renderer.reflectionMap, new Vector2(800, 600), Color.White);
  41.             EleniLib.Graphics.Renderer.setView(Renderer.Camera);
  42.             EleniLib.Graphics.Renderer.DrawDeferredScene();
  43.             hm.WaterPlane.Render(EleniLib.Graphics.Renderer.Camera);
  44.             skyCube.Draw(EleniLib.Graphics.Renderer.Camera);
  45.         }
RAW Paste Data
Top