aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host_shaders
diff options
context:
space:
mode:
authorSamuel <lizzie@eden-emu.dev>2026-08-23 23:36:24 +0200
committercrueter <crueter@eden-emu.dev>2026-08-23 23:36:24 +0200
commit86ba79b1ba79678ea52fd7bb5594c4eb71a607f7 (patch)
tree237d21e9c35cb30d26984b9df3acb4adf303e9bb /src/video_core/host_shaders
parentb610b03d29dcb7e03e1a70538bc5e0624f91705d (diff)
[vulkan, sgsr] Adjustments to SGSR implementation (#4293)
PR/ Commit Owner: CamiileLaVey This change has specified fixes on the SGSR initial implementation, it brought a wider sharpening level limits and better image quality. Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4293 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev>
Diffstat (limited to 'src/video_core/host_shaders')
-rw-r--r--src/video_core/host_shaders/sgsr1_shader.vert3
-rw-r--r--src/video_core/host_shaders/sgsr1_shader_mobile.frag1
-rw-r--r--src/video_core/host_shaders/sgsr1_shader_mobile_edge_direction.frag1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/host_shaders/sgsr1_shader.vert b/src/video_core/host_shaders/sgsr1_shader.vert
index 0d2a935a9d..e995997060 100644
--- a/src/video_core/host_shaders/sgsr1_shader.vert
+++ b/src/video_core/host_shaders/sgsr1_shader.vert
@@ -7,6 +7,7 @@ layout(push_constant) uniform constants {
vec2 scale;
vec2 size;
vec2 resize_factor;
+ vec2 crop_offset;
float edge_sharpness;
};
layout(location = 0) out highp vec2 texcoord;
@@ -15,5 +16,5 @@ void main() {
float x = float((gl_VertexIndex & 1) << 2);
float y = float((gl_VertexIndex & 2) << 1);
gl_Position = vec4(x - 1.0f, y - 1.0f, 0.0, 1.0f) * vec4(sign(resize_factor), 1.f, 1.f);
- texcoord = vec2(x, y) * abs(resize_factor) * 0.5;
+ texcoord = crop_offset + vec2(x, y) * abs(resize_factor) * 0.5;
}
diff --git a/src/video_core/host_shaders/sgsr1_shader_mobile.frag b/src/video_core/host_shaders/sgsr1_shader_mobile.frag
index 2e62d60af3..3453ca2cae 100644
--- a/src/video_core/host_shaders/sgsr1_shader_mobile.frag
+++ b/src/video_core/host_shaders/sgsr1_shader_mobile.frag
@@ -14,6 +14,7 @@ layout(push_constant) uniform constants {
vec2 scale;
vec2 size;
vec2 resize_factor;
+ vec2 crop_offset;
float edge_sharpness;
};
layout(set = 0, binding = 0) uniform sampler2D sampler0;
diff --git a/src/video_core/host_shaders/sgsr1_shader_mobile_edge_direction.frag b/src/video_core/host_shaders/sgsr1_shader_mobile_edge_direction.frag
index 10a8ff8e00..66417e9c46 100644
--- a/src/video_core/host_shaders/sgsr1_shader_mobile_edge_direction.frag
+++ b/src/video_core/host_shaders/sgsr1_shader_mobile_edge_direction.frag
@@ -13,6 +13,7 @@
layout( push_constant ) uniform constants {
vec4 ViewportInfo[1];
vec2 ResizeFactor;
+ vec2 CropOffset;
float EdgeSharpness;
};
layout(set = 0, binding = 0) uniform sampler2D ps0;