Skip to content

Commit

Permalink
fixed fsr/fxaa alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
2youyou2 committed Jul 21, 2023
1 parent 91fb580 commit 898cec1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions editor/assets/effects/pipeline/post-process/fsr.effect
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ CCProgram fs-easu %{
rendersize, rendersize, texSize.zw
);
FsrEasuF(c, gl_FragCoord.xy, con0, con1, con2, con3);
fragColor = vec4(c.xyz, 1.);
float alpha = texture(outputResultMap, v_uv).a;
fragColor = vec4(c.xyz, alpha);
}

}%
Expand Down Expand Up @@ -115,6 +116,7 @@ CCProgram fs-rcas %{

// Perform RCAS pass
vec3 col = FsrRcasF(gl_FragCoord.xy, con);
fragColor = vec4(col, 1.);
float alpha = texture(outputResultMap, v_uv).a;
fragColor = vec4(col, alpha);
}
}%
3 changes: 2 additions & 1 deletion editor/assets/effects/pipeline/post-process/fxaa-hq.effect
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CCProgram fxaa-edge-fs %{

vec4 frag () {
vec3 color = FxaaPixelShader(v_uv, sceneColorMap, texSize.zw);
return vec4(color, 1.0);
float alpha = texture(sceneColorMap, v_uv).a;
return vec4(color, alpha);
}
}%

Expand Down

0 comments on commit 898cec1

Please sign in to comment.