|
@@ -2133,7 +2133,6 @@ class MMDToonMaterial extends ShaderMaterial {
|
|
|
// merged from MeshToon/Phong/MatcapMaterial
|
|
|
const exposePropertyNames = [
|
|
|
'specular',
|
|
|
- 'shininess',
|
|
|
'opacity',
|
|
|
'diffuse',
|
|
|
|
|
@@ -2188,6 +2187,25 @@ class MMDToonMaterial extends ShaderMaterial {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // Special path for shininess to handle zero shininess properly
|
|
|
+ this._shininess = 30;
|
|
|
+ Object.defineProperty( this, 'shininess', {
|
|
|
+
|
|
|
+ get: function () {
|
|
|
+
|
|
|
+ return this._shininess;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ set: function ( value ) {
|
|
|
+
|
|
|
+ this._shininess = value;
|
|
|
+ this.uniforms.shininess.value = Math.max( this._shininess, 1e-4 ); // To prevent pow( 0.0, 0.0 )
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ } );
|
|
|
+
|
|
|
Object.defineProperty(
|
|
|
this,
|
|
|
'color',
|