@@ -39,6 +39,8 @@
* alphaMap: new THREE.Texture( <Image> ),
*
* envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),
+ * envMapIntensity: <float>
+ *
* refractionRatio: <float>,
* shading: THREE.SmoothShading,
@@ -1,5 +1,6 @@
#if defined( USE_ENVMAP ) || defined( STANDARD )
uniform float reflectivity;
+ uniform float envMapIntenstiy;
#endif
#ifdef USE_ENVMAP
@@ -163,7 +163,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
envMapColor.rgb = inputToLinear( envMapColor.rgb );
- return PI * envMapColor.rgb;
+ return PI * envMapColor.rgb * envMapIntensity;
}
@@ -237,7 +237,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
- return envMapColor.rgb;
+ return envMapColor.rgb * envMapIntensity;