|
@@ -633,8 +633,7 @@ function Viewport( editor ) {
|
|
|
|
|
|
if ( viewportCamera.isPerspectiveCamera ) {
|
|
|
|
|
|
- viewportCamera.aspect = editor.camera.aspect;
|
|
|
- viewportCamera.projectionMatrix.copy( editor.camera.projectionMatrix );
|
|
|
+ updateAspectRatio();
|
|
|
|
|
|
} else if ( viewportCamera.isOrthographicCamera ) {
|
|
|
|
|
@@ -646,6 +645,7 @@ function Viewport( editor ) {
|
|
|
|
|
|
controls.enabled = ( viewportCamera === editor.camera );
|
|
|
|
|
|
+ initPT();
|
|
|
render();
|
|
|
|
|
|
} );
|
|
@@ -657,7 +657,7 @@ function Viewport( editor ) {
|
|
|
switch ( viewportShading ) {
|
|
|
|
|
|
case 'realistic':
|
|
|
- pathtracer.init( scene, camera );
|
|
|
+ pathtracer.init( scene, editor.viewportCamera );
|
|
|
break;
|
|
|
|
|
|
case 'solid':
|
|
@@ -768,7 +768,7 @@ function Viewport( editor ) {
|
|
|
|
|
|
if ( editor.viewportShading === 'realistic' ) {
|
|
|
|
|
|
- pathtracer.init( scene, camera );
|
|
|
+ pathtracer.init( scene, editor.viewportCamera );
|
|
|
|
|
|
}
|
|
|
|