The Wayback Machine - https://webcf.waybackmachine.org/web/20220312150003/https://github.com/mrdoob/three.js/commit/ad7b74752873ca78806652bccadbad0235641606
Skip to content
Permalink
Browse files
RoughnessMipmapper: Fixed breakage when roughnessMap is undefined.
  • Loading branch information
mrdoob committed on Aug 27, 2020
1 parent 7bf355c commit ad7b74752873ca78806652bccadbad0235641606
Showing with 2 additions and 0 deletions.
  1. +2 −0 examples/jsm/utils/RoughnessMipmapper.js
@@ -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;

0 comments on commit ad7b747

Please sign in to comment.