CHAPTER 6 ■ ADDING LIGHT TO YOUR SCENE IN XNA 3.0
579
effect2Lights.CurrentTechnique = effect2Lights.Techniques["DeferredSpotLight"];
effect2Lights.Parameters["xPreviousShadingContents"].SetValue(shadingMap);
effect2Lights.Parameters["xNormalMap"].SetValue(normalMap);
effect2Lights.Parameters["xDepthMap"].SetValue(depthMap);
effect2Lights.Parameters["xShadowMap"].SetValue(shadowMap);
effect2Lights.Parameters["xLightPosition"].SetValue(spotLight.Position);
effect2Lights.Parameters["xLightStrength"].SetValue(spotLight.Strength);
effect2Lights.Parameters["xConeDirection"].SetValue(spotLight.Direction);
effect2Lights.Parameters["xConeAngle"].SetValue(spotLight.ConeAngle);
effect2Lights.Parameters["xConeDecay"].SetValue(spotLight.ConeDecay); ...