MeshStandardMaterial: Fix envMapIntensity
@@ -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
@@ -167,7 +167,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
envMapColor.rgb = inputToLinear( envMapColor.rgb );
- return PI * envMapColor.rgb;
+ return PI * envMapColor.rgb * envMapIntensity;
}
@@ -241,7 +241,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
- return envMapColor.rgb;
+ return envMapColor.rgb * envMapIntensity;