|
@@ -34,6 +34,16 @@ var CubeTexturePass = function ( camera, envMap, opacity ) {
|
|
|
} )
|
|
|
);
|
|
|
|
|
|
+ Object.defineProperty( this.cubeMesh.material, 'envMap', {
|
|
|
+
|
|
|
+ get: function () {
|
|
|
+
|
|
|
+ return this.uniforms.envMap.value;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ } );
|
|
|
+
|
|
|
this.envMap = envMap;
|
|
|
this.opacity = ( opacity !== undefined ) ? opacity : 1.0;
|
|
|
|
|
@@ -55,8 +65,8 @@ CubeTexturePass.prototype = Object.assign( Object.create( Pass.prototype ), {
|
|
|
this.cubeCamera.projectionMatrix.copy( this.camera.projectionMatrix );
|
|
|
this.cubeCamera.quaternion.setFromRotationMatrix( this.camera.matrixWorld );
|
|
|
|
|
|
- this.cubeMesh.material.envMap = this.envMap;
|
|
|
- this.cubeMesh.material.opacity = this.opacity;
|
|
|
+ this.cubeMesh.material.uniforms.envMap.value = this.envMap;
|
|
|
+ this.cubeMesh.material.uniforms.opacity.value = this.opacity;
|
|
|
this.cubeMesh.material.transparent = ( this.opacity < 1.0 );
|
|
|
|
|
|
renderer.setRenderTarget( this.renderToScreen ? null : readBuffer );
|