mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-17 12:09:16 +01:00
7d0b7f0b71
The previous method would cause OOB reads for the last row to clamp, and adding an extra row would potentially encounter unmapped memory. So use this technique based on how Ryu does it.
18 lines
388 B
GLSL
18 lines
388 B
GLSL
#version 460
|
|
|
|
layout (binding = 0, set = 0) uniform sampler2D src;
|
|
layout (location = 0) in vec2 dstUV;
|
|
layout (location = 0) out vec4 colour;
|
|
|
|
layout (push_constant) uniform constants {
|
|
layout (offset = 16)
|
|
vec2 srcOriginUV;
|
|
vec2 dstSrcScaleFactor;
|
|
} PC;
|
|
|
|
void main()
|
|
{
|
|
vec2 srcUV = dstUV * PC.dstSrcScaleFactor + PC.srcOriginUV;
|
|
colour.rgba = texture(src, srcUV);
|
|
}
|