diff options
| author | Emmanuel Hansen <emmausssss@gmail.com> | 2023-02-27 21:11:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-27 18:11:55 -0300 |
| commit | 80b497213981512e9ba1a629bcd5e2c519d2e566 (patch) | |
| tree | 0b0e8f074be1486402457ba17c941ceca1e4acff /Ryujinx.Graphics.OpenGL/Effects/Shaders/fsr_sharpening.glsl | |
| parent | 5d85468302dd21a93ac141abfb7b8749b938dc9a (diff) | |
Add Support for Post Processing Effects (#3616)
* Add Post Processing Effects
* fix events and shader issues
* fix gtk upscale slider value
* fix bgra games
* don't swap swizzle if already swapped
* restore opengl texture state after effects run
* addressed review
* use single pipeline for smaa and fsr
* call finish on all pipelines
* addressed review
* attempt fix file case
* attempt fixing file case
* fix filter level tick frequency
* adjust filter slider margins
* replace fxaa shaders with original shader
* addressed review
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Effects/Shaders/fsr_sharpening.glsl')
| -rw-r--r-- | Ryujinx.Graphics.OpenGL/Effects/Shaders/fsr_sharpening.glsl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Effects/Shaders/fsr_sharpening.glsl b/Ryujinx.Graphics.OpenGL/Effects/Shaders/fsr_sharpening.glsl new file mode 100644 index 00000000..d3b98729 --- /dev/null +++ b/Ryujinx.Graphics.OpenGL/Effects/Shaders/fsr_sharpening.glsl @@ -0,0 +1,37 @@ +#version 430 core +precision mediump float; +layout (local_size_x = 64) in; +layout(rgba8, binding = 0, location=0) uniform image2D imgOutput; +layout( location=1 ) uniform sampler2D source; +layout( location=2 ) uniform float sharpening; + +#define A_GPU 1 +#define A_GLSL 1 +#include "ffx_a.h" + +#define FSR_RCAS_F 1 +AU4 con0; + +AF4 FsrRcasLoadF(ASU2 p) { return AF4(texelFetch(source, p, 0)); } +void FsrRcasInputF(inout AF1 r, inout AF1 g, inout AF1 b) {} + +#include "ffx_fsr1.h" + +void CurrFilter(AU2 pos) +{ + AF3 c; + FsrRcasF(c.r, c.g, c.b, pos, con0); + imageStore(imgOutput, ASU2(pos), AF4(c, 1)); +} + +void main() { + FsrRcasCon(con0, sharpening); + AU2 gxy = ARmp8x8(gl_LocalInvocationID.x) + AU2(gl_WorkGroupID.x << 4u, gl_WorkGroupID.y << 4u); + CurrFilter(gxy); + gxy.x += 8u; + CurrFilter(gxy); + gxy.y += 8u; + CurrFilter(gxy); + gxy.x -= 8u; + CurrFilter(gxy); +}
\ No newline at end of file |
