Просмотр исходного кода

Use the green channel from alpha maps instead of red.

More precision is used for the green channel in RGB565 and DXT texture formats, so this would improve the quality in those cases.
Ted Cipicchio 11 лет назад
Родитель
Сommit
b57d981e13
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      src/renderers/shaders/ShaderChunk.js

+ 1 - 2
src/renderers/shaders/ShaderChunk.js

@@ -466,8 +466,7 @@ THREE.ShaderChunk = {
 
 
 		"#ifdef USE_ALPHAMAP",
 		"#ifdef USE_ALPHAMAP",
 
 
-		"	vec4 texelAlpha = texture2D( alphaMap, vUv );",
-		"	gl_FragColor.a *= texelAlpha.r;",
+		"	gl_FragColor.a *= texture2D( alphaMap, vUv ).g;",
 
 
 		"#endif"
 		"#endif"
 
 

粤ICP备19079148号