level indirect light variable
This commit is contained in:
@@ -56,6 +56,7 @@ namespace Game
|
||||
private float lightRadiusMultiplier_ = 9.45f;
|
||||
private float fallOffExponent_ = 2.0f;
|
||||
private float saturationMultiplier_ = 1.0f;
|
||||
private float indirectLightMultiplier_ = 1.0f;
|
||||
private List<MapEntity> lightEnts = new List<MapEntity>();
|
||||
private Actor worldSpawnActor = null;
|
||||
|
||||
@@ -87,6 +88,13 @@ namespace Game
|
||||
set { saturationMultiplier_ = value; resetLights = true; }
|
||||
}
|
||||
|
||||
[Range(1f, 100f)]
|
||||
public float IndirectLightMultiplier
|
||||
{
|
||||
get => indirectLightMultiplier_;
|
||||
set { indirectLightMultiplier_ = value; resetLights = true; }
|
||||
}
|
||||
|
||||
|
||||
private static void QuickHull(Float3[] points, out Float3[] outVertices)
|
||||
{
|
||||
@@ -1030,16 +1038,21 @@ namespace Game
|
||||
var task = Task.Run(() =>
|
||||
{
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
Console.Print($"Generating level SDF ({sdfModels.Count} models)...");
|
||||
FlaxEngine.Debug.Log($"Generating level SDF ({sdfModels.Count} models)...");
|
||||
|
||||
Parallel.ForEach(sdfModels/*, new ParallelOptions() { MaxDegreeOfParallelism = 1 }*/, model =>
|
||||
ParallelOptions opts = new ParallelOptions();
|
||||
FlaxEngine.Debug.Log("processorcount: " + Environment.ProcessorCount);
|
||||
if (useStaticBatching)
|
||||
opts.MaxDegreeOfParallelism = 2;//Environment.ProcessorCount / 2;
|
||||
Parallel.ForEach(sdfModels, opts, model =>
|
||||
{
|
||||
if (model.WaitForLoaded())
|
||||
throw new Exception("model was not loaded");
|
||||
model.GenerateSDF();
|
||||
|
||||
model.GenerateSDF(0.9f, 6, true, 0.15f);
|
||||
});
|
||||
|
||||
Console.Print($"Generated level SDF in {sw.Elapsed.TotalMilliseconds}ms");
|
||||
FlaxEngine.Debug.Log($"Generated level SDF in {sw.Elapsed.TotalMilliseconds}ms");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1113,9 +1126,12 @@ namespace Game
|
||||
hsv.Y *= SaturationMultiplier;
|
||||
light.Color = Color.FromHSV(hsv);
|
||||
|
||||
light.IndirectLightingIntensity = IndirectLightMultiplier;
|
||||
|
||||
light.ShadowsDepthBias = 0.0565f;
|
||||
// if low quality shadows
|
||||
light.ShadowsDepthBias = 0.2492f;
|
||||
|
||||
}
|
||||
|
||||
lightIndex++;
|
||||
|
||||
Reference in New Issue
Block a user