From 45ad76855fa25a638f7bc0be50059dd6d12d9618 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sun, 22 Sep 2024 11:59:23 +0100 Subject: [PATCH] Don't cast for lights facing away --- KeepersCompound.Lightmapper/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KeepersCompound.Lightmapper/Program.cs b/KeepersCompound.Lightmapper/Program.cs index 9c938a7..c0e1bd8 100644 --- a/KeepersCompound.Lightmapper/Program.cs +++ b/KeepersCompound.Lightmapper/Program.cs @@ -1,4 +1,4 @@ -using System.Numerics; +using System.Numerics; using KeepersCompound.LGS.Database; using KeepersCompound.LGS.Database.Chunks; using TinyEmbree; @@ -204,7 +204,7 @@ class Program var direction = renderPoly.Center - light.position; Console.WriteLine($"Light Pos: {light.position}, poly center: {renderPoly.Center}"); Console.WriteLine($"Dir: {direction}"); - // if (Vector3.Dot(plane.Normal, direction) < 0) + if (Vector3.Dot(plane.Normal, direction) < 0) { // Cast from the light to the center (later each pixel) var hit = scene.Trace(new Ray