فهرست منبع

Disposing of the depthReducer instance

Popov72 5 سال پیش
والد
کامیت
48d08d4d63
2فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 1 0
      dist/preview release/what's new.md
  2. 5 0
      src/Lights/Shadows/cascadedShadowGenerator.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -288,6 +288,7 @@
 - Fixed an issue with multiview textures ([RaananW](https://github.com/RaananW/))
 - Screenshot height and width is now forced to be integers to prevent mismatch with openGL context ([jekelija](https://github.com/jekelija))
 - Fix shadow bound calculation in CSM shadow technique ([Popov72](https://github.com/Popov72))
+- Disposing of the depthReducer used in CSM ([Popov72](https://github.com/Popov72))
 
 ## Breaking changes
 

+ 5 - 0
src/Lights/Shadows/cascadedShadowGenerator.ts

@@ -1674,6 +1674,11 @@ export class CascadedShadowGenerator implements IShadowGenerator {
             this._scene.onBeforeRenderObservable.remove(this._freezeShadowCastersBoundingInfoObservable);
             this._freezeShadowCastersBoundingInfoObservable = null;
         }
+
+        if (this._depthReducer) {
+            this._depthReducer.dispose();
+            this._depthReducer = null;
+        }
     }
 
     /**