|
@@ -207,6 +207,7 @@
|
|
|
|
|
|
public render(useCameraPostProcess?: boolean, dumpForDebug?: boolean) {
|
|
public render(useCameraPostProcess?: boolean, dumpForDebug?: boolean) {
|
|
var scene = this.getScene();
|
|
var scene = this.getScene();
|
|
|
|
+ var engine = scene.getEngine();
|
|
|
|
|
|
if (this.useCameraPostProcesses !== undefined) {
|
|
if (this.useCameraPostProcesses !== undefined) {
|
|
useCameraPostProcess = this.useCameraPostProcesses;
|
|
useCameraPostProcess = this.useCameraPostProcesses;
|
|
@@ -214,6 +215,8 @@
|
|
|
|
|
|
if (this.activeCamera && this.activeCamera !== scene.activeCamera) {
|
|
if (this.activeCamera && this.activeCamera !== scene.activeCamera) {
|
|
scene.setTransformMatrix(this.activeCamera.getViewMatrix(), this.activeCamera.getProjectionMatrix(true));
|
|
scene.setTransformMatrix(this.activeCamera.getViewMatrix(), this.activeCamera.getProjectionMatrix(true));
|
|
|
|
+ } else {
|
|
|
|
+ scene.setTransformMatrix(scene.activeCamera.getViewMatrix(), scene.activeCamera.getProjectionMatrix(true));
|
|
}
|
|
}
|
|
|
|
|
|
if (this._waitingRenderList) {
|
|
if (this._waitingRenderList) {
|
|
@@ -289,6 +292,7 @@
|
|
if (this.activeCamera && this.activeCamera !== scene.activeCamera) {
|
|
if (this.activeCamera && this.activeCamera !== scene.activeCamera) {
|
|
scene.setTransformMatrix(scene.activeCamera.getViewMatrix(), scene.activeCamera.getProjectionMatrix(true));
|
|
scene.setTransformMatrix(scene.activeCamera.getViewMatrix(), scene.activeCamera.getProjectionMatrix(true));
|
|
}
|
|
}
|
|
|
|
+ engine.setViewport(scene.activeCamera.viewport);
|
|
|
|
|
|
scene.resetCachedMaterial();
|
|
scene.resetCachedMaterial();
|
|
}
|
|
}
|
|
@@ -305,6 +309,13 @@
|
|
engine.bindFramebuffer(this._texture);
|
|
engine.bindFramebuffer(this._texture);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (this.activeCamera) {
|
|
|
|
+ engine.setViewport(this.activeCamera.viewport);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ engine.setViewport(scene.activeCamera.viewport);
|
|
|
|
+ }
|
|
|
|
|
|
this.onBeforeRenderObservable.notifyObservers(faceIndex);
|
|
this.onBeforeRenderObservable.notifyObservers(faceIndex);
|
|
|
|
|