Fixed lighting

This commit is contained in:
2025-12-16 09:13:22 -07:00
parent de5f47f47b
commit 32df388c77
6 changed files with 85 additions and 66 deletions

View File

@@ -337,7 +337,7 @@ func (s *System) IsPointInShadow(x, y float64, w *world.World) bool {
if ix, iy, ok := intersection(rayToPoint, wall); ok {
distanceToIntersection := math.Sqrt((ix-light.X)*(ix-light.X) + (iy-light.Y)*(iy-light.Y))
if distanceToIntersection < distanceToPoint-5.0 {
if distanceToIntersection < distanceToPoint-10.0 {
blocked = true
break
}