ソースを参照

ProgressiveLightMapGPU: disclove potpack hidden behavior (#30716)

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Samuel Rigaud 11 ヶ月 前
コミット
ea8a13c3af
1 ファイル変更2 行追加2 行削除
  1. 2 2
      examples/jsm/misc/ProgressiveLightMapGPU.js

+ 2 - 2
examples/jsm/misc/ProgressiveLightMapGPU.js

@@ -112,9 +112,9 @@ class ProgressiveLightMap {
 			object.receiveShadow = true;
 			object.receiveShadow = true;
 			object.renderOrder = 1000 + ob;
 			object.renderOrder = 1000 + ob;
 
 
-			// Prepare UV boxes for potpack
+			// Prepare UV boxes for potpack (potpack will update x and y)
 			// TODO: Size these by object surface area
 			// TODO: Size these by object surface area
-			uv_boxes.push( { w: 1 + ( padding * 2 ), h: 1 + ( padding * 2 ), index: ob } );
+			uv_boxes.push( { w: 1 + ( padding * 2 ), h: 1 + ( padding * 2 ), index: ob, x: 0, y: 0 } );
 
 
 			this._lightMapContainers.push( { basicMat: object.material, object: object } );
 			this._lightMapContainers.push( { basicMat: object.material, object: object } );
 
 

粤ICP备19079148号