فهرست منبع

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'