BasicEffect effect = new BasicEffect(graphicsDevice); effect.TextureEnabled = true; effect.Texture = myTexture;
BasicEffect effect = new BasicEffect(graphicsDevice); effect.LightingEnabled = true; effect.DirectionalLight0.Direction = new Vector3(-1, -1, -1);In this example, we enable lighting and set the direction of the first directional light to (-1, -1, -1). This could be used to create a more realistic lighting effect for a 3D object. Package/Library: Microsoft.Xna.Framework.Graphics.