Skip to content

Commit 799113a

Browse files
committed
Fix increased global illumination color intensity in areas of overlapping roofs
1 parent ddc08ca commit 799113a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

module.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "dev7355608@gmail.com"
1010
}
1111
],
12-
"version": "4.1.19",
12+
"version": "4.1.20",
1313
"compatibility": {
1414
"minimum": "10.286",
1515
"verified": "10.291",
@@ -45,8 +45,8 @@
4545
},
4646
"url": "https://github.com/dev7355608/perfect-vision",
4747
"manifest": "https://raw.githubusercontent.com/dev7355608/perfect-vision/main/module.json",
48-
"download": "https://github.com/dev7355608/perfect-vision/archive/v4.1.19.zip",
49-
"changelog": "https://github.com/dev7355608/perfect-vision/releases/tag/v4.1.19",
48+
"download": "https://github.com/dev7355608/perfect-vision/archive/v4.1.20.zip",
49+
"changelog": "https://github.com/dev7355608/perfect-vision/releases/tag/v4.1.20",
5050
"bugs": "https://github.com/dev7355608/perfect-vision/issues",
5151
"readme": "https://raw.githubusercontent.com/dev7355608/perfect-vision/main/README.md",
5252
"license": "https://raw.githubusercontent.com/dev7355608/perfect-vision/main/LICENSE"

scripts/core/lighting-system.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cloneData, inheritData, overrideData, updateData } from "../utils/helpers.js";
1+
import { cloneData, diffData, inheritData, overrideData, updateData } from "../utils/helpers.js";
22
import { RayCastingSystem } from "./ray-casting-system.js";
33
import { Console } from "../utils/console.js";
44
import { Notifications } from "../utils/notifications.js";
@@ -500,8 +500,11 @@ export class LightingSystem {
500500
depthIndex++;
501501
} else if (region.active) {
502502
depthIndex = Math.max(depthIndex, ...regionsAtSameElevation.filter(r =>
503-
region.globalLight !== r.globalLight &&
504-
region.bounds.intersects(r.bounds)).map(r => r.depthIndex + 1));
503+
region.bounds.intersects(r.bounds)
504+
&& (region.globalLight !== r.globalLight
505+
|| diffData(region._data.globalLightConfig, r._data.globalLightConfig)
506+
|| region.globalLight && region.source.coloration.shader?.isRequired
507+
|| r.globalLight && r.source.coloration.shader?.isRequired)).map(r => r.depthIndex + 1));
505508
}
506509
} else {
507510
this.#elevationDepthMap.push(region.elevation);

0 commit comments

Comments
 (0)