|
@@ -24,6 +24,7 @@ import { WebGLBufferRenderer } from './webgl/WebGLBufferRenderer.js';
|
|
import { WebGLCapabilities } from './webgl/WebGLCapabilities.js';
|
|
import { WebGLCapabilities } from './webgl/WebGLCapabilities.js';
|
|
import { WebGLClipping } from './webgl/WebGLClipping.js';
|
|
import { WebGLClipping } from './webgl/WebGLClipping.js';
|
|
import { WebGLCubeMaps } from './webgl/WebGLCubeMaps.js';
|
|
import { WebGLCubeMaps } from './webgl/WebGLCubeMaps.js';
|
|
|
|
+import { WebGLCubeUVMaps } from './webgl/WebGLCubeUVMaps.js';
|
|
import { WebGLExtensions } from './webgl/WebGLExtensions.js';
|
|
import { WebGLExtensions } from './webgl/WebGLExtensions.js';
|
|
import { WebGLGeometries } from './webgl/WebGLGeometries.js';
|
|
import { WebGLGeometries } from './webgl/WebGLGeometries.js';
|
|
import { WebGLIndexedBufferRenderer } from './webgl/WebGLIndexedBufferRenderer.js';
|
|
import { WebGLIndexedBufferRenderer } from './webgl/WebGLIndexedBufferRenderer.js';
|
|
@@ -266,7 +267,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
}
|
|
}
|
|
|
|
|
|
let extensions, capabilities, state, info;
|
|
let extensions, capabilities, state, info;
|
|
- let properties, textures, cubemaps, attributes, geometries, objects;
|
|
|
|
|
|
+ let properties, textures, cubemaps, cubeuvmaps, attributes, geometries, objects;
|
|
let programCache, materials, renderLists, renderStates, clipping, shadowMap;
|
|
let programCache, materials, renderLists, renderStates, clipping, shadowMap;
|
|
|
|
|
|
let background, morphtargets, bufferRenderer, indexedBufferRenderer;
|
|
let background, morphtargets, bufferRenderer, indexedBufferRenderer;
|
|
@@ -291,13 +292,14 @@ function WebGLRenderer( parameters = {} ) {
|
|
properties = new WebGLProperties();
|
|
properties = new WebGLProperties();
|
|
textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );
|
|
textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );
|
|
cubemaps = new WebGLCubeMaps( _this );
|
|
cubemaps = new WebGLCubeMaps( _this );
|
|
|
|
+ cubeuvmaps = new WebGLCubeUVMaps( _this );
|
|
attributes = new WebGLAttributes( _gl, capabilities );
|
|
attributes = new WebGLAttributes( _gl, capabilities );
|
|
bindingStates = new WebGLBindingStates( _gl, extensions, attributes, capabilities );
|
|
bindingStates = new WebGLBindingStates( _gl, extensions, attributes, capabilities );
|
|
geometries = new WebGLGeometries( _gl, attributes, info, bindingStates );
|
|
geometries = new WebGLGeometries( _gl, attributes, info, bindingStates );
|
|
objects = new WebGLObjects( _gl, geometries, attributes, info );
|
|
objects = new WebGLObjects( _gl, geometries, attributes, info );
|
|
morphtargets = new WebGLMorphtargets( _gl );
|
|
morphtargets = new WebGLMorphtargets( _gl );
|
|
clipping = new WebGLClipping( properties );
|
|
clipping = new WebGLClipping( properties );
|
|
- programCache = new WebGLPrograms( _this, cubemaps, extensions, capabilities, bindingStates, clipping );
|
|
|
|
|
|
+ programCache = new WebGLPrograms( _this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping );
|
|
materials = new WebGLMaterials( properties );
|
|
materials = new WebGLMaterials( properties );
|
|
renderLists = new WebGLRenderLists( properties );
|
|
renderLists = new WebGLRenderLists( properties );
|
|
renderStates = new WebGLRenderStates( extensions, capabilities );
|
|
renderStates = new WebGLRenderStates( extensions, capabilities );
|
|
@@ -564,6 +566,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
renderStates.dispose();
|
|
renderStates.dispose();
|
|
properties.dispose();
|
|
properties.dispose();
|
|
cubemaps.dispose();
|
|
cubemaps.dispose();
|
|
|
|
+ cubeuvmaps.dispose();
|
|
objects.dispose();
|
|
objects.dispose();
|
|
bindingStates.dispose();
|
|
bindingStates.dispose();
|
|
|
|
|
|
@@ -1388,7 +1391,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
|
|
|
materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;
|
|
materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;
|
|
materialProperties.fog = scene.fog;
|
|
materialProperties.fog = scene.fog;
|
|
- materialProperties.envMap = cubemaps.get( material.envMap || materialProperties.environment );
|
|
|
|
|
|
+ materialProperties.envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || materialProperties.environment );
|
|
|
|
|
|
if ( programs === undefined ) {
|
|
if ( programs === undefined ) {
|
|
|
|
|
|
@@ -1506,7 +1509,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
const fog = scene.fog;
|
|
const fog = scene.fog;
|
|
const environment = material.isMeshStandardMaterial ? scene.environment : null;
|
|
const environment = material.isMeshStandardMaterial ? scene.environment : null;
|
|
const encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding;
|
|
const encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding;
|
|
- const envMap = cubemaps.get( material.envMap || environment );
|
|
|
|
|
|
+ const envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment );
|
|
const vertexAlphas = material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4;
|
|
const vertexAlphas = material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4;
|
|
const morphTargets = object.geometry && object.geometry.morphAttributes.position;
|
|
const morphTargets = object.geometry && object.geometry.morphAttributes.position;
|
|
const morphNormals = object.geometry && object.geometry.morphAttributes.normal;
|
|
const morphNormals = object.geometry && object.geometry.morphAttributes.normal;
|