Ejemplo n.º 1
0
 private static LightSettings ToLightSettings(this GlobalLightingConfiguration mapLightingConfiguration)
 {
     return(new LightSettings
     {
         TerrainLights = new Lights
         {
             Light0 = ToLight(mapLightingConfiguration.TerrainSun),
             Light1 = ToLight(mapLightingConfiguration.TerrainAccent1),
             Light2 = ToLight(mapLightingConfiguration.TerrainAccent2),
         },
         ObjectLights = new Lights
         {
             Light0 = ToLight(mapLightingConfiguration.ObjectSun),
             Light1 = ToLight(mapLightingConfiguration.ObjectAccent1),
             Light2 = ToLight(mapLightingConfiguration.ObjectAccent2),
         }
     });
 }
Ejemplo n.º 2
0
 private static LightSettings ToLightSettings(this GlobalLightingConfiguration mapLightingConfiguration)
 {
     return(new LightSettings(
                new GlobalShaderResources.LightingConstantsPS
     {
         Light0 = ToLight(mapLightingConfiguration.TerrainSun),
         Light1 = ToLight(mapLightingConfiguration.TerrainAccent1),
         Light2 = ToLight(mapLightingConfiguration.TerrainAccent2),
     },
                new GlobalShaderResources.LightingConstantsPS
     {
         // RA3 and later only had one light defined per time of day.
         Light0 = ToLight(mapLightingConfiguration.ObjectSun ?? mapLightingConfiguration.TerrainSun),
         Light1 = ToLight(mapLightingConfiguration.ObjectAccent1 ?? mapLightingConfiguration.TerrainAccent1),
         Light2 = ToLight(mapLightingConfiguration.ObjectAccent2 ?? mapLightingConfiguration.TerrainAccent2),
     }
                // TODO: Infantry lights
                ));
 }