Skip to content

Commit 2a9049f

Browse files
authored
ProgressiveLightMap: Make normals mandatory. (#31825)
1 parent 67baf4a commit 2a9049f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

examples/jsm/misc/ProgressiveLightMap.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ class ProgressiveLightMap {
123123

124124
}
125125

126+
if ( object.geometry.hasAttribute( 'normal' ) === false ) {
127+
128+
console.warn( 'THREE.ProgressiveLightMap: All lightmap objects need normals.' ); continue;
129+
130+
}
131+
126132
if ( this.blurringPlane === null ) {
127133

128134
this._initializeBlurPlane( this.res, this.progressiveLightMap1 );

examples/jsm/misc/ProgressiveLightMapGPU.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ class ProgressiveLightMap {
101101

102102
}
103103

104+
if ( object.geometry.hasAttribute( 'normal' ) === false ) {
105+
106+
console.warn( 'THREE.ProgressiveLightMap: All lightmap objects need normals.' ); continue;
107+
108+
}
109+
104110
if ( this._blurringPlane === null ) {
105111

106112
this._initializeBlurPlane();

0 commit comments

Comments
 (0)