Browse Source

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

Ali-RS 4 years ago
parent
commit
90a35047ef
1 changed files with 2 additions and 2 deletions
  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);
 }