Skip to content

Commit

Permalink
RoughnessMipmapper: Fixed breakage when roughnessMap is undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Aug 27, 2020
1 parent 7bf355c commit ad7b747
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/jsm/utils/RoughnessMipmapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ RoughnessMipmapper.prototype = {

generateMipmaps: function ( material ) {

if ( 'roughnessMap' in material === false ) return;

var { roughnessMap, normalMap } = material;

if ( roughnessMap === null || normalMap === null || ! roughnessMap.generateMipmaps || material.userData.roughnessUpdated ) return;
Expand Down

0 comments on commit ad7b747

Please sign in to comment.