예제 #1
0
 /// <summary>
 /// Включаёт влияние фонового направленного света.
 /// </summary>
 /// <param name="light">Направленный свет без источника.</param>
 public void EnableDirLight(DirectionLight light)
 {
     Shader.SetUniform3("dirLight.ambient", light.Ambient);
     Shader.SetUniform3("dirLight.diffuse", light.Diffuse);
     Shader.SetUniform3("dirLight.specular", light.Specular);
     Shader.SetUniform3("dirLight.direction", light.Direction);
 }
예제 #2
0
 public Scene(string vertexShaderSource, string fragmentShaderSource)
 {
     Shapes         = new List <Shape>();
     Lights         = new List <LightSource>();
     DirectionLight = new DirectionLight();
     Controller     = new ShaderController(vertexShaderSource, fragmentShaderSource);
 }