Merge pull request #35 from MrRaveYard/pr_defaults

Add default auto probe grid size
This commit is contained in:
Magnus Norddahl 2022-06-15 00:27:02 +02:00 committed by GitHub
commit 27a8ef3855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,8 +138,8 @@ void FLevel::SetupLights()
if (LightBounce > 8) LightBounce = 8; if (LightBounce > 8) LightBounce = 8;
// auto probe grid size // auto probe grid size
GridSize = thing->args[3]; GridSize = thing->args[3] ? thing->args[3] : 64.0f;
if (GridSize < 0.f) GridSize = 0.f; if (GridSize < 1.f) GridSize = 1.f;
if (GridSize > 1024.f) GridSize = 1024.f; if (GridSize > 1024.f) GridSize = 1024.f;
if (dot(sundir, sundir) > 0.01f) if (dot(sundir, sundir) > 0.01f)