Skip to content

Commit 90a3504

Browse files
authored
FXAA.frag: read alpha value from texture instead of passing constant 1. (#1517)
1 parent 9c0220c commit 90a3504

File tree

1 file changed

+2
-2
lines changed
  • jme3-effects/src/main/resources/Common/MatDefs/Post

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ vec3 FxaaPixelShader(
8484

8585
void main()
8686
{
87-
88-
gl_FragColor = vec4(FxaaPixelShader(posPos, m_Texture, g_ResolutionInverse), 1.0);
87+
vec4 texVal = texture2D(m_Texture, texCoord);
88+
gl_FragColor = vec4(FxaaPixelShader(posPos, m_Texture, g_ResolutionInverse), texVal.a);
8989
}

0 commit comments

Comments
 (0)