|
@@ -2,7 +2,7 @@
|
|
|
* @author mrdoob / http://mrdoob.com/
|
|
|
*/
|
|
|
|
|
|
-import { BackSide, FrontSide } from '../../constants.js';
|
|
|
+import { BackSide, FrontSide, CubeUVReflectionMapping } from '../../constants.js';
|
|
|
import { BoxBufferGeometry } from '../../geometries/BoxGeometry.js';
|
|
|
import { PlaneBufferGeometry } from '../../geometries/PlaneGeometry.js';
|
|
|
import { ShaderMaterial } from '../../materials/ShaderMaterial.js';
|
|
@@ -60,7 +60,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( background && ( background.isCubeTexture || background.isWebGLRenderTargetCube ) ) {
|
|
|
+ if ( background && ( background.isCubeTexture || background.isWebGLRenderTargetCube || background.mapping === CubeUVReflectionMapping ) ) {
|
|
|
|
|
|
if ( boxMesh === undefined ) {
|
|
|
|
|
@@ -92,7 +92,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
|
|
|
|
|
|
get: function () {
|
|
|
|
|
|
- return this.uniforms.tCube.value;
|
|
|
+ return this.envMap.value;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -103,8 +103,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
|
|
|
}
|
|
|
|
|
|
var texture = background.isWebGLRenderTargetCube ? background.texture : background;
|
|
|
- boxMesh.material.uniforms.tCube.value = texture;
|
|
|
- boxMesh.material.uniforms.tFlip.value = ( background.isWebGLRenderTargetCube ) ? 1 : - 1;
|
|
|
+ boxMesh.material.envMap = texture;
|
|
|
|
|
|
if ( currentBackground !== background ||
|
|
|
currentBackgroundVersion !== texture.version ) {
|