Skip to content

Commit

Permalink
Merge pull request #15816 from MiiBond/mbond/ibl-shadow-voxelization-fix
Browse files Browse the repository at this point in the history
IBL shadow voxelization fix
  • Loading branch information
sebavan authored Nov 14, 2024
2 parents 7b7f4d8 + 3df51dd commit f5429b7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ export class _IblShadowsVoxelRenderer {
if (this._voxelDebugEnabled) {
this._addRTsForRender([this._voxelSlabDebugRT], includedMeshes, this._voxelDebugAxis, 1, true);
}
this._scene.onAfterRenderTargetsRenderObservable.addOnce(this._renderVoxelGrid.bind(this));
this._scene.onAfterRenderObservable.addOnce(this._renderVoxelGrid.bind(this));
}

private _renderVoxelGrid() {
Expand All @@ -656,7 +656,6 @@ export class _IblShadowsVoxelRenderer {
this._generateMipMaps();
this._copyMipMaps();
this._voxelizationInProgress = false;
this._scene.onAfterRenderTargetsRenderObservable.removeCallback((this as any).boundVoxelGridRenderFn);
} else if (!this._renderInFlight) {
this._renderInFlight = true;
setTimeout(() => {
Expand Down

0 comments on commit f5429b7

Please sign in to comment.