提交 6365d638 编写于 作者: M Mr.doob

MTLLoader: Convert shininess to float. See #7252.

上级 a13cf434
...@@ -351,7 +351,7 @@ THREE.MTLLoader.MaterialCreator.prototype = { ...@@ -351,7 +351,7 @@ THREE.MTLLoader.MaterialCreator.prototype = {
// The specular exponent (defines the focus of the specular highlight) // The specular exponent (defines the focus of the specular highlight)
// A high exponent results in a tight, concentrated highlight. Ns values normally range from 0 to 1000. // A high exponent results in a tight, concentrated highlight. Ns values normally range from 0 to 1000.
params[ 'shininess' ] = value; params[ 'shininess' ] = parseFloat( value );
break; break;
......
...@@ -1880,7 +1880,7 @@ THREE.WebGLRenderer = function ( parameters ) { ...@@ -1880,7 +1880,7 @@ THREE.WebGLRenderer = function ( parameters ) {
function refreshUniformsPhong ( uniforms, material ) { function refreshUniformsPhong ( uniforms, material ) {
uniforms.specular.value = material.specular; uniforms.specular.value = material.specular;
uniforms.shininess.value = Math.max( material.shininess, 1e-4 ); uniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 )
if ( material.lightMap ) { if ( material.lightMap ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册