Don't cast for lights facing away

This commit is contained in:
Jarrod Doyle 2024-09-22 11:59:23 +01:00
parent 4bc55b9130
commit 45ad76855f
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 2 additions and 2 deletions

View File

@ -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