@@ -2132,10 +2132,10 @@ class WebGLRenderer {
21322132
21332133 // always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change
21342134
2135- materialProperties . environment = ( material . isMeshStandardMaterial || material . isMeshLambertMaterial ) ? scene . environment : null ;
2135+ materialProperties . environment = ( material . isMeshStandardMaterial || material . isMeshLambertMaterial || material . isMeshPhongMaterial ) ? scene . environment : null ;
21362136 materialProperties . fog = scene . fog ;
21372137
2138- const usePMREM = material . isMeshStandardMaterial || ( material . isMeshLambertMaterial && ! material . envMap ) ;
2138+ const usePMREM = material . isMeshStandardMaterial || ( material . isMeshLambertMaterial && ! material . envMap ) || ( material . isMeshPhongMaterial && ! material . envMap ) ;
21392139 materialProperties . envMap = environments . get ( material . envMap || materialProperties . environment , usePMREM ) ;
21402140 materialProperties . envMapRotation = ( materialProperties . environment !== null && material . envMap === null ) ? scene . environmentRotation : material . envMapRotation ;
21412141
@@ -2267,9 +2267,9 @@ class WebGLRenderer {
22672267 textures . resetTextureUnits ( ) ;
22682268
22692269 const fog = scene . fog ;
2270- const environment = ( material . isMeshStandardMaterial || material . isMeshLambertMaterial ) ? scene . environment : null ;
2270+ const environment = ( material . isMeshStandardMaterial || material . isMeshLambertMaterial || material . isMeshPhongMaterial ) ? scene . environment : null ;
22712271 const colorSpace = ( _currentRenderTarget === null ) ? _this . outputColorSpace : ( _currentRenderTarget . isXRRenderTarget === true ? _currentRenderTarget . texture . colorSpace : LinearSRGBColorSpace ) ;
2272- const usePMREM = material . isMeshStandardMaterial || ( material . isMeshLambertMaterial && ! material . envMap ) ;
2272+ const usePMREM = material . isMeshStandardMaterial || ( material . isMeshLambertMaterial && ! material . envMap ) || ( material . isMeshPhongMaterial && ! material . envMap ) ;
22732273 const envMap = environments . get ( material . envMap || environment , usePMREM ) ;
22742274 const vertexAlphas = material . vertexColors === true && ! ! geometry . attributes . color && geometry . attributes . color . itemSize === 4 ;
22752275 const vertexTangents = ! ! geometry . attributes . tangent && ( ! ! material . normalMap || material . anisotropy > 0 ) ;
@@ -2595,7 +2595,7 @@ class WebGLRenderer {
25952595
25962596 }
25972597
2598- if ( ( material . isMeshStandardMaterial || material . isMeshLambertMaterial ) && material . envMap === null && scene . environment !== null ) {
2598+ if ( ( material . isMeshStandardMaterial || material . isMeshLambertMaterial || material . isMeshPhongMaterial ) && material . envMap === null && scene . environment !== null ) {
25992599
26002600 m_uniforms . envMapIntensity . value = scene . environmentIntensity ;
26012601
0 commit comments