Procházet zdrojové kódy

Merge pull request #12752 from takahirox/FixGLTFSpecularGlossiness

Fix glTF Specular-Glossiness material
Mr.doob před 7 roky
rodič
revize
df5269083e
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  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'