2
0
Эх сурвалжийг харах

Merge pull request #12752 from takahirox/FixGLTFSpecularGlossiness

Fix glTF Specular-Glossiness material
Mr.doob 7 жил өмнө
parent
commit
df5269083e

+ 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'