@onerjs/addons 8.30.4 → 8.30.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atmosphere/atmosphere.d.ts +3 -2
- package/atmosphere/atmosphere.js +5 -4
- package/atmosphere/atmosphere.js.map +1 -1
- package/atmosphere/atmospherePBRMaterialPlugin.js +3 -0
- package/atmosphere/atmospherePBRMaterialPlugin.js.map +1 -1
- package/atmosphere/atmospherePerCameraVariables.d.ts +6 -0
- package/atmosphere/atmospherePerCameraVariables.js +33 -14
- package/atmosphere/atmospherePerCameraVariables.js.map +1 -1
- package/atmosphere/diffuseSkyIrradianceLut.js +2 -1
- package/atmosphere/diffuseSkyIrradianceLut.js.map +1 -1
- package/atmosphere/transmittanceLut.js +2 -1
- package/atmosphere/transmittanceLut.js.map +1 -1
- package/package.json +2 -2
|
@@ -109,11 +109,11 @@ export declare class Atmosphere implements IDisposable {
|
|
|
109
109
|
/**
|
|
110
110
|
* Called before the LUTs are rendered for this camera. This happens after the per-camera UBO update.
|
|
111
111
|
*/
|
|
112
|
-
readonly onBeforeRenderLutsForCameraObservable: Observable<
|
|
112
|
+
readonly onBeforeRenderLutsForCameraObservable: Observable<Camera>;
|
|
113
113
|
/**
|
|
114
114
|
* Called after the LUTs were rendered.
|
|
115
115
|
*/
|
|
116
|
-
readonly onAfterRenderLutsForCameraObservable: Observable<
|
|
116
|
+
readonly onAfterRenderLutsForCameraObservable: Observable<Camera>;
|
|
117
117
|
/**
|
|
118
118
|
* If provided, this is the depth texture used for composition passes.
|
|
119
119
|
* Expects an infinite far plane on the camera (camera.maxZ = 0) and the non-linear depth accessible in red channel.
|
|
@@ -367,6 +367,7 @@ export declare class Atmosphere implements IDisposable {
|
|
|
367
367
|
/**
|
|
368
368
|
* Renders the lookup tables, some of which can vary per-camera.
|
|
369
369
|
* It is expected that updatePerCameraVariables was previously called.
|
|
370
|
+
* @param camera - The camera to render the LUTs for.
|
|
370
371
|
*/
|
|
371
372
|
private _renderLutsForCamera;
|
|
372
373
|
/**
|
package/atmosphere/atmosphere.js
CHANGED
|
@@ -627,7 +627,7 @@ export class Atmosphere {
|
|
|
627
627
|
// Before rendering, make sure the per-camera variables have been updated.
|
|
628
628
|
this._onBeforeCameraRenderObserver = scene.onBeforeCameraRenderObservable.add((x) => {
|
|
629
629
|
this._updatePerCameraVariables(x);
|
|
630
|
-
this._renderLutsForCamera();
|
|
630
|
+
this._renderLutsForCamera(x);
|
|
631
631
|
});
|
|
632
632
|
{
|
|
633
633
|
const renderingManager = scene.renderingManager;
|
|
@@ -967,8 +967,9 @@ export class Atmosphere {
|
|
|
967
967
|
/**
|
|
968
968
|
* Renders the lookup tables, some of which can vary per-camera.
|
|
969
969
|
* It is expected that updatePerCameraVariables was previously called.
|
|
970
|
+
* @param camera - The camera to render the LUTs for.
|
|
970
971
|
*/
|
|
971
|
-
_renderLutsForCamera() {
|
|
972
|
+
_renderLutsForCamera(camera) {
|
|
972
973
|
{
|
|
973
974
|
this.onBeforeLightVariablesUpdateObservable.notifyObservers();
|
|
974
975
|
const light = this.lights[0];
|
|
@@ -985,7 +986,7 @@ export class Atmosphere {
|
|
|
985
986
|
// Render the LUTs.
|
|
986
987
|
const isEnabled = this.isEnabled();
|
|
987
988
|
{
|
|
988
|
-
this.onBeforeRenderLutsForCameraObservable.notifyObservers();
|
|
989
|
+
this.onBeforeRenderLutsForCameraObservable.notifyObservers(camera);
|
|
989
990
|
// After UBO update we can render the global LUTs which use some of these values on the GPU.
|
|
990
991
|
// TODO: Could break out update and UBOs to global vs. per-camera.
|
|
991
992
|
this.renderGlobalLuts();
|
|
@@ -1008,7 +1009,7 @@ export class Atmosphere {
|
|
|
1008
1009
|
this._aerialPerspectiveLutHasBeenRendered = true;
|
|
1009
1010
|
}
|
|
1010
1011
|
}
|
|
1011
|
-
this.onAfterRenderLutsForCameraObservable.notifyObservers();
|
|
1012
|
+
this.onAfterRenderLutsForCameraObservable.notifyObservers(camera);
|
|
1012
1013
|
}
|
|
1013
1014
|
}
|
|
1014
1015
|
/**
|