mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-27 06:01:16 +01:00
[TEST] Playing with SGSR
This commit is contained in:
parent
3423d3c6a5
commit
35aeb0cf55
6 changed files with 24 additions and 16 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue