|
|
@@ -44,6 +44,7 @@ class ClusteredLightsNode extends LightsNode {
|
|
|
|
|
|
this.materialLights = [];
|
|
|
this.clusteredLights = [];
|
|
|
+ this._allLights = [];
|
|
|
|
|
|
this.maxLights = maxLights;
|
|
|
this.tileSize = tileSize;
|
|
|
@@ -205,6 +206,8 @@ class ClusteredLightsNode extends LightsNode {
|
|
|
|
|
|
setLights( lights ) {
|
|
|
|
|
|
+ this._allLights = lights;
|
|
|
+
|
|
|
const { clusteredLights, materialLights } = this;
|
|
|
|
|
|
let materialIndex = 0;
|
|
|
@@ -231,6 +234,12 @@ class ClusteredLightsNode extends LightsNode {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ getLights() {
|
|
|
+
|
|
|
+ return this._allLights;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
getBlock() {
|
|
|
|
|
|
return this._lightIndexes.element( this._screenClusterIndex.mul( int( this._chunksPerCluster ) ) );
|