build/three.common.js
// Uniforms (refresh uniforms objects)
Uniforms (refresh uniforms objects)
Uniforms ( refresh uniforms objects )
function refreshUniformsCommon ( uniforms, material ) {
		uniforms.opacity.value = material.opacity;
		if ( _this.gammaInput ) {
			uniforms.diffuse.value.copyGammaToLinear( material.color );
		} else {
			uniforms.diffuse.value = material.color;
		}
		uniforms.map.value = material.map;
		uniforms.lightMap.value = material.lightMap;
		uniforms.specularMap.value = material.specularMap;
		uniforms.alphaMap.value = material.alphaMap;
		if ( material.bumpMap ) {
			uniforms.bumpMap.value = material.bumpMap;
			uniforms.bumpScale.value = material.bumpScale;
		}
		if ( material.normalMap ) {
			uniforms.normalMap.value = material.normalMap;
			uniforms.normalScale.value.copy( material.normalScale );
		}
		var uvScaleMap;
		if ( material.map ) {
			uvScaleMap = material.map;
		} else if ( material.specularMap ) {
			uvScaleMap = material.specularMap;
		} else if ( material.normalMap ) {
			uvScaleMap = material.normalMap;
		} else if ( material.bumpMap ) {
			uvScaleMap = material.bumpMap;
		} else if ( material.alphaMap ) {
			uvScaleMap = material.alphaMap;
		}
		if ( uvScaleMap !== undefined ) {
			var offset = uvScaleMap.offset;
			var repeat = uvScaleMap.repeat;
			uniforms.offsetRepeat.value.set( offset.x, offset.y, repeat.x, repeat.y );
		}
		uniforms.envMap.value = material.envMap;
		uniforms.flipEnvMap.value = ( material.envMap instanceof THREE.WebGLRenderTargetCube ) ? 1 : - 1;
		if ( _this.gammaInput ) {
			uniforms.reflectivity.value = material.reflectivity;
		} else {
			uniforms.reflectivity.value = material.reflectivity;
		}
		uniforms.refractionRatio.value = material.refractionRatio;
	}
function refreshUniformsCommon ( uniforms , material ) { uniforms . opacity . value = material . opacity ; if ( _this . gammaInput ) { uniforms . diffuse . value . copyGammaToLinear ( material . color ) ; } else { uniforms . diffuse . value = material . color ; } uniforms . map . value = material . map ; uniforms . lightMap . value = material . lightMap ; uniforms . specularMap . value = material . specularMap ; uniforms . alphaMap . value = material . alphaMap ; if ( material . bumpMap ) { uniforms . bumpMap . value = material . bumpMap ; uniforms . bumpScale . value = material . bumpScale ; } if ( material . normalMap ) { uniforms . normalMap . value = material . normalMap ; uniforms . normalScale . value . copy ( material . normalScale ) ; } var uvScaleMap ; if ( material . map ) { uvScaleMap = material . map ; } else if ( material . specularMap ) { uvScaleMap = material . specularMap ; } else if ( material . normalMap ) { uvScaleMap = material . normalMap ; } else if ( material . bumpMap ) { uvScaleMap = material . bumpMap ; } else if ( material . alphaMap ) { uvScaleMap = material . alphaMap ; } if ( uvScaleMap !== undefined ) { var offset = uvScaleMap . offset ; var repeat = uvScaleMap . repeat ; uniforms . offsetRepeat . value . set ( offset . x , offset . y , repeat . x , repeat . y ) ; } uniforms . envMap . value = material . envMap ; uniforms . flipEnvMap . value = ( material . envMap instanceof THREE . WebGLRenderTargetCube ) ? 1 : - 1 ; if ( _this . gammaInput ) { uniforms . reflectivity . value = material . reflectivity ; } else { uniforms . reflectivity . value = material . reflectivity ; } uniforms . refractionRatio . value = material . refractionRatio ; }
Uniforms (refresh uniforms objects)
Uniforms ( refresh uniforms objects )
// uv repeat and offset setting priorities //  1. color map //  2. specular map //  3. normal map //  4. bump map //  5. alpha map //uniforms.reflectivity.value = material.reflectivity * material.reflectivity;