optimize light radius, add fake ambient lighting and enable AO

This commit is contained in:
2022-05-22 17:18:33 +03:00
parent b7d95cfaa3
commit 99aa9ab6f8
4 changed files with 67 additions and 4 deletions

View File

@@ -722,6 +722,8 @@ namespace Game
private void ParseLight(MapEntity entity, Actor worldSpawnActor, ref int lightIndex)
{
const bool lightsUseInverseSquaredFalloff = true;
//Console.Print("light");
PointLight light = worldSpawnActor.AddChild<PointLight>();
light.Name = "Light_" + lightIndex;
@@ -746,6 +748,24 @@ namespace Game
light.ShadowsDistance = 2000f * 1f;
if (lightsUseInverseSquaredFalloff)
{
if (true)
{
light.Radius *= 0.5f;
light.FallOffExponent = 2f;
light.Brightness *= 1.25f;
}
else
{
light.Radius *= 0.4f;
light.FallOffExponent = 2f;
light.Brightness *= 1.6f;
}
//light.Brightness *= 2500f;
//light.UseInverseSquaredFalloff = true;
}
if (true)
{
// match FTEQW dynamic only light values