Преглед изворни кода

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);
 }