File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Editor/Transform/Environment/LilToon Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -389,6 +389,17 @@ public ISealedLoweredMaterialReference LowerInline(Material m)
389
389
// set NormalMap
390
390
standardMaterial . SetTexture ( BumpMap , m . GetTexture ( BumpMap ) ) ;
391
391
392
+ var useEmission = m . GetInt ( "_UseEmission" ) > 0 ;
393
+ if ( useEmission )
394
+ {
395
+ // enable emission property.
396
+ // see: https://discussions.unity.com/t/720658/7
397
+ standardMaterial . EnableKeyword ( "_EMISSION" ) ;
398
+ standardMaterial . globalIlluminationFlags = MaterialGlobalIlluminationFlags . None ;
399
+ standardMaterial . SetColor ( "_EmissionColor" , m . GetColor ( "_EmissionColor" ) ) ;
400
+ standardMaterial . SetTexture ( "_EmissionMap" , m . GetTexture ( "_EmissionMap" ) ) ;
401
+ }
402
+
392
403
return new LoweredMaterialReference ( new InMemory < Material > ( standardMaterial ) , mode ) ;
393
404
}
394
405
}
You can’t perform that action at this time.
0 commit comments