Browse Source

simplify lightingEffect initialization

GitOrigin-RevId: 28ca3d2336
master
Colin McMillen 4 years ago
parent
commit
8405f32f3c
  1. 9
      Shared/Scene.cs

9
Shared/Scene.cs

@ -28,10 +28,11 @@ namespace SemiColinGames {
graphics, camera.Width, camera.Height, false /* mipmap */,
graphics.PresentationParameters.BackBufferFormat, DepthFormat.Depth24);
lightingEffect = new BasicEffect(graphics);
lightingEffect.World = Matrix.CreateTranslation(0, 0, 0);
lightingEffect.View = Matrix.CreateLookAt(Vector3.Backward, Vector3.Zero, Vector3.Up);
lightingEffect.VertexColorEnabled = true;
lightingEffect = new BasicEffect(graphics) {
World = Matrix.CreateTranslation(0, 0, 0),
View = Matrix.CreateLookAt(Vector3.Backward, Vector3.Zero, Vector3.Up),
VertexColorEnabled = true
};
spriteBatch = new SpriteBatch(graphics);
}

Loading…
Cancel
Save