public override void SetSunLight(SunLight light)
		{
			if (!isLightingAlreadySet)
			{
				device.ShaderEffect.AmbientLightColor = Vector3.One * AmbientLightIntensity;
				isLightingAlreadySet = true;
			}
			device.ShaderEffect.DirectionalLight0.DiffuseColor =
				new Vector3(light.Color.RedValue, light.Color.GreenValue, light.Color.BlueValue);
			device.ShaderEffect.DirectionalLight0.Direction =
				new Vector3(-light.Direction.X, -light.Direction.Y, -light.Direction.Z);
		}
		public override void SetSunLight(SunLight light)
		{
			shaderValues.LightDirection = new[]
			{
				light.Direction.X, light.Direction.Y, light.Direction.Z, 0.0f
			};
			shaderValues.LightColor = new[]
			{
				light.Color.RedValue, light.Color.GreenValue, light.Color.BlueValue, light.Color.AlphaValue
			};
		}
示例#3
0
		public override void SetSunLight(SunLight light) {}
示例#4
0
 public abstract void SetSunLight(SunLight light);
示例#5
0
		public override void SetSunLight(SunLight light)
		{
			device.SetUniformValue(viewMatrixLocation, viewMatrix);
			device.SetUniformValue(normalMatrixLocation, Matrix.InverseTranspose(modelViewMatrix));
			SetUniformColorValue(lightColorUniformLocation, light.Color);
			device.SetUniformValue(lightDirectionUniformLocation, light.Direction);
		}