فهرست منبع

FXAA.frag: read alpha value from texture instead of passing constant 1. (#1517)

Ali-RS 4 سال پیش
والد
کامیت
90a35047ef
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      jme3-effects/src/main/resources/Common/MatDefs/Post/FXAA.frag

+ 2 - 2
jme3-effects/src/main/resources/Common/MatDefs/Post/FXAA.frag

@@ -84,6 +84,6 @@ vec3 FxaaPixelShader(
 
 void main()
 {
-
-    gl_FragColor = vec4(FxaaPixelShader(posPos, m_Texture, g_ResolutionInverse), 1.0);
+    vec4 texVal = texture2D(m_Texture, texCoord);
+    gl_FragColor = vec4(FxaaPixelShader(posPos, m_Texture, g_ResolutionInverse), texVal.a);
 }