|
@@ -8168,14 +8168,15 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
if ( this.envMap && this.envMap.isTexture ) {
|
|
|
|
|
|
data.envMap = this.envMap.toJSON( meta ).uuid;
|
|
|
- data.reflectivity = this.reflectivity; // Scale behind envMap
|
|
|
- data.refractionRatio = this.refractionRatio;
|
|
|
|
|
|
if ( this.combine !== undefined ) data.combine = this.combine;
|
|
|
- if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;
|
|
|
|
|
|
}
|
|
|
|
|
|
+ if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;
|
|
|
+ if ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity;
|
|
|
+ if ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio;
|
|
|
+
|
|
|
if ( this.gradientMap && this.gradientMap.isTexture ) {
|
|
|
|
|
|
data.gradientMap = this.gradientMap.toJSON( meta ).uuid;
|
|
@@ -17548,7 +17549,7 @@ function WebGLPrograms( renderer, cubemaps, extensions, capabilities, bindingSta
|
|
|
|
|
|
vertexTangents: ( material.normalMap && material.vertexTangents ),
|
|
|
vertexColors: material.vertexColors,
|
|
|
- vertexAlphas: material.vertexColors === true && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4,
|
|
|
+ vertexAlphas: material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4,
|
|
|
vertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatMap || !! material.clearcoatRoughnessMap || !! material.clearcoatNormalMap || !! material.displacementMap || !! material.transmissionMap,
|
|
|
uvsVertexOnly: ! ( !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatNormalMap || !! material.transmissionMap ) && !! material.displacementMap,
|
|
|
|
|
@@ -24728,7 +24729,7 @@ function WebGLRenderer( parameters ) {
|
|
|
const environment = material.isMeshStandardMaterial ? scene.environment : null;
|
|
|
const encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding;
|
|
|
const envMap = cubemaps.get( material.envMap || environment );
|
|
|
- const vertexAlphas = material.vertexColors === true && 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 materialProperties = properties.get( material );
|
|
|
const lights = currentRenderState.state.lights;
|