Don't cast for lights facing away
This commit is contained in:
parent
4bc55b9130
commit
45ad76855f
|
@ -1,4 +1,4 @@
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using KeepersCompound.LGS.Database;
|
using KeepersCompound.LGS.Database;
|
||||||
using KeepersCompound.LGS.Database.Chunks;
|
using KeepersCompound.LGS.Database.Chunks;
|
||||||
using TinyEmbree;
|
using TinyEmbree;
|
||||||
|
@ -204,7 +204,7 @@ class Program
|
||||||
var direction = renderPoly.Center - light.position;
|
var direction = renderPoly.Center - light.position;
|
||||||
Console.WriteLine($"Light Pos: {light.position}, poly center: {renderPoly.Center}");
|
Console.WriteLine($"Light Pos: {light.position}, poly center: {renderPoly.Center}");
|
||||||
Console.WriteLine($"Dir: {direction}");
|
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)
|
// Cast from the light to the center (later each pixel)
|
||||||
var hit = scene.Trace(new Ray
|
var hit = scene.Trace(new Ray
|
||||||
|
|
Loading…
Reference in New Issue