소스 검색

Implemented @bhouston's #7420.

Mr.doob 9 년 전
부모
커밋
ed7be74d7a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/renderers/shaders/ShaderChunk/lights_standard_fragment.glsl

+ 1 - 1
src/renderers/shaders/ShaderChunk/lights_standard_fragment.glsl

@@ -1,4 +1,4 @@
 PhysicalMaterial material;
 material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
-material.specularRoughness = roughnessFactor * 0.5 + 0.5; // disney's remapping of [ 0, 1 ] roughness to [ 0.5, 1 ]
+material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 ); // disney's remapping of [ 0, 1 ] roughness to [ 0.04, 1 ]
 material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );