Browse Source

Properly dispose of shader

WestLangley 5 năm trước cách đây
mục cha
commit
1507706731

+ 2 - 0
examples/js/pmrem/PMREMGenerator.js

@@ -150,6 +150,8 @@ THREE.PMREMGenerator = ( function () {
 
 			}
 
+			shader.dispose();
+
 		},
 
 	};

+ 2 - 0
examples/jsm/pmrem/PMREMGenerator.js

@@ -167,6 +167,8 @@ var PMREMGenerator = ( function () {
 
 			}
 
+			shader.dispose();
+
 		},
 
 	};