Преглед на файлове

Fix glTF Specular-Glossiness material by converting specularMap in sRGB space

Takahiro преди 7 години
родител
ревизия
1bc987e707
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      examples/js/loaders/GLTFLoader.js

+ 1 - 0
examples/js/loaders/GLTFLoader.js

@@ -529,6 +529,7 @@ THREE.GLTFLoader = ( function () {
 					'vec3 specularFactor = specular;',
 					'#ifdef USE_SPECULARMAP',
 					'	vec4 texelSpecular = texture2D( specularMap, vUv );',
+					'	texelSpecular = sRGBToLinear( texelSpecular );',
 					'	// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture',
 					'	specularFactor *= texelSpecular.rgb;',
 					'#endif'