CHAPTER 6 ■ ADDING LIGHT TO YOUR SCENE IN XNA 3.0
538
InyourDraw method, add this code to set up your BasicEffect to add specular highlights
to your quad:
basicEffect.World = Matrix.Identity;
basicEffect.View = fpsCam.ViewMatrix;
basicEffect.Projection = fpsCam.ProjectionMatrix;
basicEffect.Texture = blueTexture;
basicEffect.TextureEnabled = true;
Vector3 lightDirection = new Vector3(0, -3, -10);
lightDirection.Normalize();
basicEffect.LightingEnabled = true;
basicEffect.DirectionalLight0.Direction = lightDirection;
basicEffect.DirectionalLight0.DiffuseColor = Color.White.ToVector3();
basicEffect.DirectionalLight0.Enabled = true;
basicEffect.PreferPerPixelLighting = true;
basicEffect.DirectionalLight0.SpecularColor = Color.White.ToVector3();
basicEffect.SpecularPower ...