Explorar el Código

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

Ali-RS hace 4 años
padre
commit
90a35047ef
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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);
 }