Browse Source

Properly dispose of shader

WestLangley 5 years ago
parent
commit
1507706731
2 changed files with 4 additions and 0 deletions
  1. 2 0
      examples/js/pmrem/PMREMGenerator.js
  2. 2 0
      examples/jsm/pmrem/PMREMGenerator.js

+ 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();
+
 		},
 
 	};